diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2020-07-28 15:44:09 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2020-07-28 17:36:18 +0200 |
commit | 6a4277a9a9871cc5bc85dc5d11b7216474f4af72 (patch) | |
tree | d1b54b93e23a8a14c706f57957208b7e02567c67 /gtk/gtkpopover.c | |
parent | 3285f52dc8dce89faae4ff811156aa039427ea96 (diff) | |
download | gtk+-6a4277a9a9871cc5bc85dc5d11b7216474f4af72.tar.gz |
gtkpopover: Move away from gdk_device_get_state()
Use gdk_device_get_modifier_state() poking the keyboard and keymap,
instead of this function.
Diffstat (limited to 'gtk/gtkpopover.c')
-rw-r--r-- | gtk/gtkpopover.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c index 62ae3c902a..d77d225a1e 100644 --- a/gtk/gtkpopover.c +++ b/gtk/gtkpopover.c @@ -602,7 +602,6 @@ close_menu (GtkPopover *popover) static gboolean gtk_popover_has_mnemonic_modifier_pressed (GtkPopover *popover) { - GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover); GList *seats, *s; gboolean retval = FALSE; @@ -610,10 +609,10 @@ gtk_popover_has_mnemonic_modifier_pressed (GtkPopover *popover) for (s = seats; s; s = s->next) { - GdkDevice *dev = gdk_seat_get_pointer (s->data); + GdkDevice *dev = gdk_seat_get_keyboard (s->data); GdkModifierType mask; - gdk_device_get_state (dev, priv->surface, NULL, &mask); + mask = gdk_device_get_modifier_state (dev); if ((mask & gtk_accelerator_get_default_mod_mask ()) == GDK_ALT_MASK) { retval = TRUE; |