wxWindow *wxGetActiveWindow()
{
// TODO
- wxFAIL_MSG(_("Not implemented"));
+ wxFAIL_MSG("Not implemented");
return NULL;
}
// 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);
}
// ----------------------------------------------------------------------------