X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a8680e3e0e5066d35a8f4fd43294ba4bfcaf4ba7..e8617760b089b3dd31e4d77ce493267a82fc1003:/src/motif/window.cpp diff --git a/src/motif/window.cpp b/src/motif/window.cpp index cc55da5b8d..c7f7e4e919 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -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;