Closed Turtleb01 closed 1 year ago
See #224
These events are generated by the X server and are related to ICCCM 6.3-compliant button grabs. When clicking in a client window and a button grab activates on an ancestor window, the pointer is automatically grabbed. The pointer leaves the client window and enters the ancestor window until the ButtonPress is handled and event queue released/replayed.
The pop-up menu issue is because the application doesn't take into account the possibility that window managers may establish button binding grabs (such as click-to-focus) on parent/root in accordance with ICCCM 6.3.
There is now a workaround in master to avoid these issues.
When pressing the left mouse button in xev, the output looks like this:
As you can see from the timestamps, LeaveNotify, EnterNotify and KeymapNotify are sent when lmb is pressed down. No additional events appear when it's released.
In other window managers (dwm and i3 tested) only ButtonPress and ButtonRelease are sent.
Due to this weird behavior, chromium pop-up menus like the right-click menu in openstreetmap.org don't work; the incorrect events close the menu before the click is registered.