diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2020-07-30 14:29:12 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2020-07-30 18:30:13 +0200 |
commit | 6730b26b433227d2aeec356c57aec8ed479a92ff (patch) | |
tree | 0626d2be576d39ae13e49f4a3fc0eddd4109638f /gtk/gtktextview.c | |
parent | 6e83d1f54ec56459fc93d07571606d777e7a546e (diff) | |
download | gtk+-6730b26b433227d2aeec356c57aec8ed479a92ff.tar.gz |
gtktextview: Avoid gdk_device_get_associated_device()
Query the seat for that.
Diffstat (limited to 'gtk/gtktextview.c')
-rw-r--r-- | gtk/gtktextview.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index f59b259277..81f14a175c 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -8628,12 +8628,14 @@ gtk_text_view_do_popup (GtkTextView *text_view, if (trigger_event && gdk_event_triggers_context_menu (trigger_event)) { GdkDevice *device; + GdkSeat *seat; GdkRectangle rect = { 0, 0, 1, 1 }; device = gdk_event_get_device (trigger_event); + seat = gdk_event_get_seat (trigger_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) { |