summaryrefslogtreecommitdiff
path: root/gtk/gtkwindowhandle.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2020-07-30 14:28:59 +0200
committerCarlos Garnacho <carlosg@gnome.org>2020-07-30 18:19:44 +0200
commit6e83d1f54ec56459fc93d07571606d777e7a546e (patch)
tree7c3c3bc32ebfd1d7e578648ade2d27d9de7d9932 /gtk/gtkwindowhandle.c
parentfb9db7fedea031b60672f3248d445146e402e73d (diff)
downloadgtk+-6e83d1f54ec56459fc93d07571606d777e7a546e.tar.gz
gtkwindowhandle: Avoid gdk_device_get_associated_device()
Query the seat for that.
Diffstat (limited to 'gtk/gtkwindowhandle.c')
-rw-r--r--gtk/gtkwindowhandle.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/gtkwindowhandle.c b/gtk/gtkwindowhandle.c
index 4818f78bc6..1792f5c47f 100644
--- a/gtk/gtkwindowhandle.c
+++ b/gtk/gtkwindowhandle.c
@@ -157,6 +157,7 @@ do_popup_fallback (GtkWindowHandle *self,
{
GdkRectangle rect = { 0, 0, 1, 1 };
GdkDevice *device;
+ GdkSeat *seat;
GtkWidget *box, *menuitem;
GtkWindow *window;
gboolean maximized, resizable, deletable;
@@ -186,9 +187,10 @@ do_popup_fallback (GtkWindowHandle *self,
device = gdk_event_get_device (event);
+ seat = gdk_event_get_seat (event);
- if (device && gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
- device = gdk_device_get_associated_device (device);
+ if (device == gdk_seat_get_keyboard (seat))
+ device = gdk_seat_get_pointer (seat);
if (device)
{