]> git.saurik.com Git - wxWidgets.git/commitdiff
wxWindow::Enable now correctly has recursive effect (and maybe other fixes)
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 14 Oct 2001 22:20:24 +0000 (22:20 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 14 Oct 2001 22:20:24 +0000 (22:20 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mgl/window.cpp

index d03dfa66bda9cc30f31162ac771747da2a998ccd..b79394efbc7489b4df5257f3c65c8a8cc1cd3a7a 100644 (file)
@@ -117,7 +117,6 @@ bool wxCreateMGL_WM()
     
 #if wxUSE_SYSTEM_OPTIONS
     // FIXME_MGL -- so what is The Proper Way?
-    width=800, height=600;
     if ( wxSystemOptions::HasOption(wxT("mgl.screen-width") )
         width = wxSystemOptions::GetOptionInt(wxT("mgl.screen-width"));
     if ( wxSystemOptions::HasOption(wxT("mgl.screen-height") )
@@ -199,7 +198,13 @@ static ibool wxWindowMouseHandler(window_t *wnd, event_t *e)
     MGL_wmCoordGlobalToLocal(win->GetHandle(), 
                              e->where_x, e->where_y, &where.x, &where.y);
 
-    if ( !win->IsEnabled() ) return FALSE;
+    for (wxWindowMGL *w = win; w; w = w->GetParent())
+    {
+        if ( !w->IsEnabled() ) 
+            return FALSE;
+        if ( w->IsTopLevel() )
+            break;
+    }
     
     wxEventType type = wxEVT_NULL;
     wxMouseEvent event;