mirror of
https://github.com/brl/mutter.git
synced 2025-03-28 22:23:47 +00:00

If the user presses a button on a pointer device and then moves out the Stage X11 will emit the following events: LeaveNotify ➔ MotionNotify ... ➔ ButtonRelease ➔ LeaveNotify The second LeaveNotify differs from the first by the state field. Unfortunately, ClutterCrossingEvent doesn't have a modifier_state field like other events, so we cannot provide a way for programmatically distinguishing them from a Clutter perspective. This is also an X11-ism we might not even want to replicate on every backend with sane enter/leave semantics. For this reason we should check inside the X11 event processing if the pointer device has already left the Stage and ignore the second LeaveNotify.