From f5055d8528ddca80cbe7e3802f0e80cb244ab889 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 16 Mar 2013 19:43:33 +0100 Subject: [PATCH] get rid of some REALLY stupid code (generic pointer READ, but x11 specific pointer WARP?!?) --- libs/gtkutil/cursor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.39.2