From: Rudolf Polzer Date: Sat, 16 Mar 2013 18:43:33 +0000 (+0100) Subject: get rid of some REALLY stupid code (generic pointer READ, but x11 specific pointer... X-Git-Tag: xonotic-v0.7.0~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f5055d8528ddca80cbe7e3802f0e80cb244ab889;p=xonotic%2Fnetradiant.git get rid of some REALLY stupid code (generic pointer READ, but x11 specific pointer WARP?!?) --- diff --git a/libs/gtkutil/cursor.cpp b/libs/gtkutil/cursor.cpp index 6005bf1f..cf1935bf 100644 --- a/libs/gtkutil/cursor.cpp +++ b/libs/gtkutil/cursor.cpp @@ -57,6 +57,8 @@ void default_cursor( GtkWidget* widget ){ #if defined( WIN32 ) +// FIXME do we really need this? gdk_display_warp_pointer should not be depending on X11, so... + #include void Sys_GetCursorPos( GtkWindow* window, int *x, int *y ){ @@ -77,14 +79,12 @@ void Sys_SetCursorPos( GtkWindow* window, int x, int y ){ #else -#include - void Sys_GetCursorPos( GtkWindow* window, int *x, int *y ){ gdk_display_get_pointer( gdk_display_get_default(), 0, x, y, 0 ); } void Sys_SetCursorPos( GtkWindow* window, int x, int y ){ - XWarpPointer( GDK_DISPLAY(), None, GDK_ROOT_WINDOW(), 0, 0, 0, 0, x, y ); + gdk_display_warp_pointer( gdk_display_get_default(), 0, x, y ); } #endif