X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4dff340069297c51f04fcd230282b86eee6943db..d6c9c1b71e069396bbe3850862de9aa10e6812e0:/src/motif/window.cpp diff --git a/src/motif/window.cpp b/src/motif/window.cpp index 28768bbaa0..456b75c715 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -23,8 +23,8 @@ #ifdef __VMS #define XtDisplay XTDISPLAY -#define XtWINDOW XTWINDOW -#define XtSreen XTSCREEN +#define XtWindow XTWINDOW +#define XtScreen XTSCREEN #endif #include "wx/setup.h" @@ -2984,9 +2984,34 @@ void wxWindow::ChangeFont(bool keepOriginalSize) wxWindow *wxGetActiveWindow() { // TODO + wxFAIL_MSG("Not implemented"); return NULL; } +// Find the wxWindow at the current mouse position, returning the mouse +// position. +wxWindow* wxFindWindowAtPointer(wxPoint& pt) +{ + return wxFindWindowAtPoint(wxGetMousePosition()); +} + +// Get the current mouse position. +wxPoint wxGetMousePosition() +{ + 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); +} + // ---------------------------------------------------------------------------- // wxNoOptimize: switch off size optimization // ----------------------------------------------------------------------------