]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/window.cpp
assert is raised when using the thread sample (which works) so the test is
[wxWidgets.git] / src / motif / window.cpp
index cc55da5b8d20f46fa4c1913a873fdff62293ef8d..c7f7e4e919a0eda69dcaf020828489f488975365 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)
@@ -2329,7 +2337,7 @@ bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win,
 
                 // check for a double click
                 //
-                long dclickTime = XtGetMultiClickTime(wxGlobalDisplay());
+                long dclickTime = XtGetMultiClickTime(xevent->xany.display);
                 long ts = wxevent.GetTimestamp();
 
                 int buttonLast = win->GetLastClickedButton();
@@ -2616,7 +2624,7 @@ wxWindow* wxFindWindowAtPointer(wxPoint& pt)
 // Get the current mouse position.
 wxPoint wxGetMousePosition()
 {
-    Display *display = (Display*) wxGetDisplay();
+    Display *display = wxGlobalDisplay();
     Window rootWindow = RootWindowOfScreen (DefaultScreenOfDisplay(display));
     Window rootReturn, childReturn;
     int rootX, rootY, winX, winY;