GNOME Bugzilla – Bug 567312
leave_notify_event triggered inappropriately when compositing enabled
Last modified: 2018-02-10 03:21:50 UTC
Please describe the problem: When the compositing window manager is running (e.g. enabling Visual Effects under System->Preferences->Appearance in Ubuntu), the "leave-notify-event" signal will be triggered whenever the user performs an action that would usually be considered a "button-press-event", such as clicking the left or right mouse buttons or even activating the scroll wheel. Steps to reproduce: 1. Compile and run the attached testcase 2. Enable window compositing 3. Click within the window area 4. Disable window compositing and compare the outcome of (3) Actual results: The callback for "leave_notify_event" is triggered not only when the cursor leaves the window, but when the user clicks the mouse or moves the scroll wheel within the window. Expected results: The callback for "leave_notify_event" should only be triggered when the cursor leaves the window. Does this happen every time? Yes. Other information: I am running a stock Ubuntu 8.10 system. The bug also occurs in PyGTK.
Created attachment 126196 [details] testcase
Not happening here with the metacity compositor. Probably some compiz-specific problem. To find out more, it would be good to know the exact sequence of X events that your application is receiving when running unter compiz.
I'm not sure how to capture the sequence of X events - do you have a recommendation? Also, I would like to know how I can enable compositing for Metacity (without using Compiz) such that the widgets when queried with is_composited() report "true".
compile gtk with debug support, and set GDK_DEBUG=events in the environment for metacity compositor, gconftool-2 --set --type bool /apps/metacity/general/compositing_manager true
Created attachment 126393 [details] event trace without compiz My test run was simple - start the program, enter the window with the cursor, click once, then leave the window, and finally close the window.
Created attachment 126394 [details] event trace with compiz enabled same procedure followed. There were some extra lines generated that say "Gdk-Message: client message: window: 58720259" as I dallied around.
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue for it.