forked from AuroraMiddleware/gtk
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:
parent
6a4277a9a9
commit
5f8258109e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user