gtkwindow: Move away from gdk_device_get_state()

Use gdk_device_get_modifier_state() poking the keyboard and keymap,
instead of this function.
This commit is contained in:
Carlos Garnacho 2020-07-28 15:46:05 +02:00
parent 6a4277a9a9
commit 5f8258109e

View File

@ -4749,7 +4749,6 @@ gtk_window_real_activate_focus (GtkWindow *window)
static gboolean
gtk_window_has_mnemonic_modifier_pressed (GtkWindow *window)
{
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
GList *seats, *s;
gboolean retval = FALSE;
@ -4757,10 +4756,10 @@ gtk_window_has_mnemonic_modifier_pressed (GtkWindow *window)
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;