]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/window.cpp
fixed Cyrillic encodings
[wxWidgets.git] / src / motif / window.cpp
index 53a0dd26e3c385204efd2a9ef3dc86befa2b6b06..456b75c71560c12cc2021d57e09277c016dae6be 100644 (file)
@@ -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);
 }
 
 // ----------------------------------------------------------------------------