]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
gtk is retarded. Nevertheless, the warping CAN be platform independent.
authorRudolf Polzer <divverent@xonotic.org>
Sat, 16 Mar 2013 19:02:31 +0000 (20:02 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Sat, 16 Mar 2013 19:02:31 +0000 (20:02 +0100)
libs/gtkutil/cursor.cpp

index 407735c9553bf24c4d49d924c25584b8793bfd1b..f0538a5089963bad6a1c7f5279b2bce7c73c4daa 100644 (file)
@@ -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 );
 }