Put m_ok earlier in SelectBitmap, else get assert after SelectObject(wxNullBitmap)
'Fixed' longlong to long conversion messages by redefinging GetMillisecondsTime
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15233
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
dc.DestroyClippingRegion();
wxRegion region(x + 110, y + 20, 100, 270);
+#ifndef __WXMOTIF__
if ( !firstTime )
region.Offset(10, 10);
-
+#endif
dc.SetClippingRegion(region);
dc.SetBrush( *wxGREY_BRUSH );
extern "C" ulong _EVT_getTicks();
#define GetMillisecondsTime() _EVT_getTicks()
#else
- #define GetMillisecondsTime() wxGetLocalTimeMillis().ToLong()
+// #define GetMillisecondsTime() wxGetLocalTimeMillis().ToLong()
+ // Suppresses the debug warning in ToLong. FIXME: check
+ // that we don't drastically lose precision
+ #define GetMillisecondsTime() (unsigned long) wxGetLocalTimeMillis().GetValue()
#endif
// ----------------------------------------------------------------------------
&gcvalues);
m_backgroundPixel = (int) gcvalues.background;
+ m_ok = TRUE;
// Get the current Font so we can set it back later
XGCValues valReturn;
SetOptimization(oldOpt);
- m_ok = TRUE;
}
else
{
#endif
{
// wxLogDebug( "FocusIn from %s of type %s", win->GetName().c_str(), win->GetClassInfo()->GetClassName() );
-
+#if 0
+ wxString msg;
+ msg.Printf( "FocusIn from %s of type %s\n", win->GetName().c_str(), win->GetClassInfo()->GetClassName() );
+ printf(msg.c_str());
+#endif
+
wxFocusEvent focusEvent(wxEVT_SET_FOCUS, win->GetId());
focusEvent.SetEventObject(win);
focusEvent.SetWindow( g_prevFocus );
{
m_needsInputFocus = TRUE;
}
+#if 0
+ wxString msg;
+ msg.Printf("SetFocus: %s\n", GetClassInfo()->GetClassName());
+ printf(msg.c_str());
+#endif
}
// Get the window with the focus
// Set the input focus if couldn't do it before
if (m_needsInputFocus)
{
+#if 0
+ wxString msg;
+ msg.Printf("Setting focus for %s from OnInternalIdle\n", GetClassInfo()->GetClassName());
+ printf(msg.c_str());
+#endif
SetFocus();
+ // If it couldn't set the focus now, there's
+ // no point in trying again.
+ m_needsInputFocus = FALSE;
}
}