GNOME Bugzilla – Bug 697144
Popup menu mnemonics fixes
Last modified: 2013-04-02 21:39:26 UTC
See attached patchset. This fixes the annoying bug where mnemonics are displayed automatically when a popup menu is shown.
Created attachment 240432 [details] [review] window: reset timeout source id before setting property gtk_window_set_mnemonics_visible() will try to g_source_remove() it otherwise, which seems harmless, but conceptually wrong.
Created attachment 240433 [details] [review] window: rename functions dealing with mnemonic delayed display Don't mention "auto mnemonics", since those methods are purely about scheduling a delayed display, and that makes understanding the code a bit harder.
Created attachment 240434 [details] [review] window: refactor a function Instead of having maybe_set_mnemonics_visible(), separate the checks from the actual scheduling of mnemonics display.
Created attachment 240435 [details] [review] 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.
Review of attachment 240432 [details] [review]: sure
Review of attachment 240433 [details] [review]: fine with me
Review of attachment 240434 [details] [review]: ok
Review of attachment 240435 [details] [review]: good catch
Attachment 240432 [details] pushed as a101e85 - window: reset timeout source id before setting property Attachment 240433 [details] pushed as 1b3f5d3 - window: rename functions dealing with mnemonic delayed display Attachment 240434 [details] pushed as 4a8203a - window: refactor a function Attachment 240435 [details] pushed as 66b0b28 - window: don't schedule a display of mnemonics if window has no modifier