Skip to content

Commit

Permalink
dix: check for grab type before checking XI2 mask
Browse files Browse the repository at this point in the history
if the grab type isn't XI2, grab->xi2mask is random. That random data may
have the enter/leave mask set, leading to events sent to the client that the
client can't handler.

Source of these errors:
  _xgeWireToEvent: Unknown extension 131, this should never happen.

Simplest reproducer:
   Start Xephyr, press button inside window, move out. As the pointer leaves
   the Xephyr window, the errors appear.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
  • Loading branch information
whot committed Aug 30, 2013
1 parent 16894df commit 82939e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dix/events.c
Expand Up @@ -4653,7 +4653,7 @@ DeviceEnterLeaveEvent(DeviceIntPtr mouse,

filter = GetEventFilter(mouse, (xEvent *) event);

if (grab) {
if (grab && grab->type == XI2) {
Mask mask;

mask = xi2mask_isset(grab->xi2mask, mouse, type);
Expand Down

0 comments on commit 82939e0

Please sign in to comment.