From a0359528df1927e5c11429efe12582deb275d702 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 16 Mar 2013 20:02:31 +0100 Subject: [PATCH] gtk is retarded. Nevertheless, the warping CAN be platform independent. --- libs/gtkutil/cursor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/gtkutil/cursor.cpp b/libs/gtkutil/cursor.cpp index 407735c9..f0538a50 100644 --- a/libs/gtkutil/cursor.cpp +++ b/libs/gtkutil/cursor.cpp @@ -60,5 +60,7 @@ void Sys_GetCursorPos( GtkWindow* window, int *x, int *y ){ } void Sys_SetCursorPos( GtkWindow* window, int x, int y ){ - gdk_display_warp_pointer( gdk_display_get_default(), 0, x, y ); + GdkScreen *screen; + gdk_display_get_pointer( gdk_display_get_default(), &screen, 0, 0, 0 ); + gdk_display_warp_pointer( gdk_display_get_default(), screen, x, y ); } -- 2.39.2