After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 690581 - XI2 Regression: Window menus do not respond to motion events
XI2 Regression: Window menus do not respond to motion events
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other Windows
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-12-20 23:09 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2013-02-07 23:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
core: Add a helper function to grab the old event mask of a window (1.58 KB, patch)
2013-02-07 22:53 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
Make sure to include the old XI2 mask when selecting for events (2.48 KB, patch)
2013-02-07 22:53 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2012-12-20 23:09:43 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.
Comment 1 Jasper St. Pierre (not reading bugmail) 2012-12-20 23:10:44 UTC
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.
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-02-07 22:53:56 UTC
Created attachment 235461 [details] [review]
core: Add a helper function to grab the old event mask of a window
Comment 3 Jasper St. Pierre (not reading bugmail) 2013-02-07 22:53:58 UTC
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.
Comment 4 drago01 2013-02-07 23:03:12 UTC
Review of attachment 235461 [details] [review]:

OK.
Comment 5 drago01 2013-02-07 23:03:49 UTC
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.
Comment 6 Jasper St. Pierre (not reading bugmail) 2013-02-07 23:14:00 UTC
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.