put both versions of wxGetMousePosition in one place so they can use one implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -97,11 +97,6 @@ void wxDisplaySizeMM( int *width, int *height )
|
|||||||
if (height) *height = gdk_screen_height_mm();
|
if (height) *height = gdk_screen_height_mm();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGetMousePosition( int* x, int* y )
|
|
||||||
{
|
|
||||||
gdk_window_get_pointer(gtk_widget_get_root_window(wxGetRootWindow()), x, y, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxColourDisplay()
|
bool wxColourDisplay()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
@@ -4686,18 +4686,23 @@ wxWindow* wxFindWindowAtPointer(wxPoint& pt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the current mouse position.
|
// Get the current mouse position.
|
||||||
wxPoint wxGetMousePosition()
|
void wxGetMousePosition(int* x, int* y)
|
||||||
{
|
{
|
||||||
int x, y;
|
|
||||||
GdkDisplay* display = GetDisplay();
|
GdkDisplay* display = GetDisplay();
|
||||||
#ifdef __WXGTK3__
|
#ifdef __WXGTK3__
|
||||||
GdkDeviceManager* manager = gdk_display_get_device_manager(display);
|
GdkDeviceManager* manager = gdk_display_get_device_manager(display);
|
||||||
GdkDevice* device = gdk_device_manager_get_client_pointer(manager);
|
GdkDevice* device = gdk_device_manager_get_client_pointer(manager);
|
||||||
gdk_device_get_position(device, NULL, &x, &y);
|
gdk_device_get_position(device, NULL, x, y);
|
||||||
#else
|
#else
|
||||||
gdk_display_get_pointer(display, NULL, &x, &y, NULL);
|
gdk_display_get_pointer(display, NULL, x, y, NULL);
|
||||||
#endif
|
#endif
|
||||||
return wxPoint(x, y);
|
}
|
||||||
|
|
||||||
|
wxPoint wxGetMousePosition()
|
||||||
|
{
|
||||||
|
wxPoint pt;
|
||||||
|
wxGetMousePosition(&pt.x, &pt.y);
|
||||||
|
return pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
GdkWindow* wxWindowGTK::GTKGetDrawingWindow() const
|
GdkWindow* wxWindowGTK::GTKGetDrawingWindow() const
|
||||||
|
Reference in New Issue
Block a user