]> git.saurik.com Git - wxWidgets.git/commitdiff
1. make paint events debugging runtime switch instead of compile time
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 9 Feb 2002 23:28:05 +0000 (23:28 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 9 Feb 2002 23:28:05 +0000 (23:28 +0000)
2. fixed incorrect rendering of wxListCtrl (newly created controls didn't account
   for parent's client origin)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mgl/window.cpp

index 36e2e1344379ce1f979c204b3151772276d6389d..12fd871b8d2433b783e3d7733395077bdbd4b946 100644 (file)
@@ -591,6 +591,7 @@ bool wxWindowMGL::Create(wxWindow *parent,
         x = 0; // FIXME_MGL, something better, see GTK+
     if ( y == -1 )
         y = 0; // FIXME_MGL, something better, see GTK+
+    AdjustForParentClientOrigin(x, y, 0);
     w = WidthDefault(size.x);
     h = HeightDefault(size.y);
     
@@ -1126,10 +1127,17 @@ void wxWindowMGL::HandlePaint(MGLDevCtx *dc)
         return;
     }
     
-#if 0 // FIXME_MGL -- debugging stuff!
-    dc->setColorRGB(255,0,255);
-    dc->fillRect(-1000,-1000,2000,2000);
-    wxUsleep(50);
+#ifdef __WXDEBUG__ 
+    // FIXME_MGL -- debugging stuff, to be removed!
+    static int debugPaintEvents = -1;
+    if ( debugPaintEvents == -1 )
+        debugPaintEvents = wxGetEnv(wxT("WXMGL_DEBUG_PAINT_EVENTS"), NULL);
+    if ( debugPaintEvents )
+    {
+        dc->setColorRGB(255,0,255);
+        dc->fillRect(-1000,-1000,2000,2000);
+        wxUsleep(50);
+    }
 #endif
 
     MGLRegion clip;