]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix for the fact that unmapped but managed widgets
authorMattia Barbon <mbarbon@cpan.org>
Sun, 4 May 2003 12:19:57 +0000 (12:19 +0000)
committerMattia Barbon <mbarbon@cpan.org>
Sun, 4 May 2003 12:19:57 +0000 (12:19 +0000)
intercept mouse events even if they are not visible.

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

src/motif/window.cpp

index cc55da5b8d20f46fa4c1913a873fdff62293ef8d..855d4e178586dfbc9d11a27a6c6674bd6136cef6 100644 (file)
@@ -172,10 +172,18 @@ bool wxWindow::MapOrUnmap(WXWidget widget, bool domap)
     if ( !w )
         return FALSE;
 
+    // if the widget is not unmanaged, it still intercepts
+    // mouse events, even if it is not mapped (and hence invisible)
     if ( domap )
+    {
+        XtManageChild(w);
         XtMapWidget(w);
+    }
     else
+    {
         XtUnmapWidget(w);
+        XtUnmanageChild(w);
+    }
 
     //   Rationale: a lot of common operations (including but not
     // limited to moving, resizing and appending items to a listbox)