window: don't schedule a display of mnemonics if window has no modifier
When the window has no mnemonics modifier set, as in the case of a GtkMenu, never schedule a display of mnemonics on focus-in. Previously, for those windows, the GdkModifierType mask fetched from the device would typically have been zero, leading to the mnemonic_modifier == (mask & gtk_accelerator_get_default_mod_mask ()) check to succeed, so we would always trigger a display for popup menus. https://bugzilla.gnome.org/show_bug.cgi?id=697144
This commit is contained in:
parent
cfb1e56561
commit
a60ddd9a02
@ -7138,6 +7138,9 @@ gtk_window_has_mnemonic_modifier_pressed (GtkWindow *window)
|
||||
GdkDeviceManager *device_manager;
|
||||
gboolean retval = FALSE;
|
||||
|
||||
if (!window->priv->mnemonic_modifier)
|
||||
return FALSE;
|
||||
|
||||
device_manager = gdk_display_get_device_manager (gtk_widget_get_display (GTK_WIDGET (window)));
|
||||
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user