From 52a9212a492d2525a3988e4c6141536e17fe6e64 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 8 Dec 2021 06:27:20 +0200 Subject: [PATCH 48/48] gtk3x: Replace gdk_device_get_state() call gtk-3.99.0 drops the function. See osdn #43312 Signed-off-by: Marko Lindqvist --- client/gui-gtk-4.0/mapctrl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/gui-gtk-4.0/mapctrl.c b/client/gui-gtk-4.0/mapctrl.c index 8a741e4541..5c034e154b 100644 --- a/client/gui-gtk-4.0/mapctrl.c +++ b/client/gui-gtk-4.0/mapctrl.c @@ -334,6 +334,7 @@ void update_rect_at_mouse_pos(void) double x, y; GdkSurface *window; GdkDevice *pointer; + GdkDevice *keyboard; GdkModifierType mask; GdkSeat *seat = gdk_display_get_default_seat(gtk_widget_get_display(toplevel)); @@ -345,7 +346,8 @@ void update_rect_at_mouse_pos(void) window = gdk_device_get_surface_at_position(pointer, &x, &y); if (window && window == gtk_native_get_surface(gtk_widget_get_native(map_canvas))) { - gdk_device_get_state(pointer, window, NULL, &mask); + keyboard = gdk_seat_get_keyboard(seat); + mask = gdk_device_get_modifier_state(keyboard); if (mask & GDK_BUTTON3_MASK) { update_selection_rectangle(x, y); } -- 2.33.0