X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3723b7b1d8cbeebccef4f8ad7fe3884dfca9eca6..1be06faf7318abf88a35b299b90ceb2a49c0353b:/src/motif/window.cpp diff --git a/src/motif/window.cpp b/src/motif/window.cpp index 53a0dd26e3..456b75c715 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -2984,7 +2984,7 @@ void wxWindow::ChangeFont(bool keepOriginalSize) wxWindow *wxGetActiveWindow() { // TODO - wxFAIL_MSG(_("Not implemented")); + wxFAIL_MSG("Not implemented"); return NULL; } @@ -2992,15 +2992,24 @@ wxWindow *wxGetActiveWindow() // position. wxWindow* wxFindWindowAtPointer(wxPoint& pt) { - wxFAIL_MSG(_("Not implemented")); - return NULL; + return wxFindWindowAtPoint(wxGetMousePosition()); } // Get the current mouse position. wxPoint wxGetMousePosition() { - wxFAIL_MSG(_("Not implemented")); - return wxPoint; + Display *display = (Display*) wxGetDisplay(); + Window rootWindow = RootWindowOfScreen (DefaultScreenOfDisplay(display)); + Window rootReturn, childReturn; + int rootX, rootY, winX, winY; + unsigned int maskReturn; + + XQueryPointer (display, + rootWindow, + &rootReturn, + &childReturn, + &rootX, &rootY, &winX, &winY, &maskReturn); + return wxPoint(rootX, rootY); } // ----------------------------------------------------------------------------