[gtk+] window: don't schedule a display of mnemonics if window has no modifier
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] window: don't schedule a display of mnemonics if window has no modifier
- Date: Tue, 2 Apr 2013 21:40:35 +0000 (UTC)
commit a60ddd9a02e8eafcaed5d1b539f13e511b70a55e
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Apr 2 16:36:30 2013 -0400
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
gtk/gtkwindow.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index cddf227..eaf0b57 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]