From: Thomas Debesse Date: Mon, 25 May 2020 17:43:59 +0000 (+0200) Subject: fix merge of 9d6e27e4e37e7406e8691594fb0b74aab89e954b, pointer stuff X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=db90de4431abfb7848d9c2a116c4a35ac938c436;p=xonotic%2Fnetradiant.git fix merge of 9d6e27e4e37e7406e8691594fb0b74aab89e954b, pointer stuff --- diff --git a/libs/gtkutil/cursor.cpp b/libs/gtkutil/cursor.cpp index 48a00187..58d68c95 100644 --- a/libs/gtkutil/cursor.cpp +++ b/libs/gtkutil/cursor.cpp @@ -74,8 +74,8 @@ gboolean FreezePointer::motion_delta(ui::Window widget, GdkEventMotion *event, F //globalOutputStream() << "motion x: " << dx << ", y: " << dy << "\n"; if (ddx < -32 || ddx > 32 || ddy < -32 || ddy > 32) { Sys_SetCursorPos( widget, self->center_x, self->center_y ); - self->last_x = self->recorded_x; - self->last_y = self->recorded_y; + self->last_x = self->center_x; + self->last_y = self->center_y; } self->m_function( dx, dy, event->state, self->m_data ); } @@ -109,7 +109,7 @@ void FreezePointer::freeze_pointer(ui::Window window, ui::Widget widget, FreezeP gdk_cursor_unref( cursor ); - Sys_GetCursorPos( window, ¢er_x, ¢er_y ); + Sys_GetCursorPos( window, &recorded_x, &recorded_y ); /* using center for tracking for max safety */ gdk_window_get_origin( GTK_WIDGET( widget )->window, ¢er_x, ¢er_y ); @@ -135,9 +135,9 @@ void FreezePointer::unfreeze_pointer(ui::Window window) m_function = 0; m_data = 0; -// Sys_SetCursorPos( window, center_x, center_y ); + Sys_SetCursorPos( window, recorded_x, recorded_y ); +// gdk_window_set_cursor( GTK_WIDGET( window )->window, 0 ); gdk_pointer_ungrab( GDK_CURRENT_TIME ); - gtk_grab_remove( weedjet ); }