GNOME Bugzilla – Bug 690581
XI2 Regression: Window menus do not respond to motion events
Last modified: 2013-02-07 23:14:04 UTC
Steps: 1. Right-click on a window title-bar 2. Move your mouse over the menu Expected: The highlight changes with the menu. Actual: The highlight becomes "stuck" on an item. Clicking on an item still works fine. Note that the menu responds fine to Enter/Leave correctly.
Adding logging to GTK+, I found that the window that was being sent for motions was the root window, rather than the menu that is grabbed. This is probably some fancy combination of mutter / GTK+ grab interaction, or event filters.
Created attachment 235461 [details] [review] core: Add a helper function to grab the old event mask of a window
Created attachment 235462 [details] [review] Make sure to include the old XI2 mask when selecting for events Some windows may already have event masks on them that we've selected for, especially if we're using GTK+ windows. In particular, this fixes window menus in the XI2 port.
Review of attachment 235461 [details] [review]: OK.
Review of attachment 235462 [details] [review]: OK, makes sense and works but: core/window.c:942:5: warning: implicit declaration of function 'meta_core_add_old_event_mask' [-Wimplicit-function-declaration] core/window.c:942:5: warning: nested extern declaration of 'meta_core_add_old_event_mask' [-Wnested-externs] etc. You need to include core.h in those files.
Attachment 235461 [details] pushed as d794db8 - core: Add a helper function to grab the old event mask of a window Attachment 235462 [details] pushed as 453020c - Make sure to include the old XI2 mask when selecting for events Pushed with a change to solve it.