dix: Set focus field on XI2 crossing events
Set on DeviceEnterLeaveEvent() the xXIEnterEvent->focus field similarly to how the CoreEnterLeaveEvent() function above does for core events. This fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=677329 reported to GTK+, where focus handling on window managers with sloppy focus or no window manager present was broken due to this field being always set to FALSE. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
3e4be4033a
commit
509b3c3dc8
|
@ -4569,6 +4569,7 @@ DeviceEnterLeaveEvent(DeviceIntPtr mouse,
|
|||
{
|
||||
GrabPtr grab = mouse->deviceGrab.grab;
|
||||
xXIEnterEvent *event;
|
||||
WindowPtr focus;
|
||||
int filter;
|
||||
int btlen, len, i;
|
||||
DeviceIntPtr kbd;
|
||||
|
@ -4610,6 +4611,11 @@ DeviceEnterLeaveEvent(DeviceIntPtr mouse,
|
|||
event->group.locked_group = kbd->key->xkbInfo->state.locked_group;
|
||||
}
|
||||
|
||||
focus = (kbd) ? kbd->focus->win : None;
|
||||
if ((focus != NoneWin) &&
|
||||
((pWin == focus) || (focus == PointerRootWin) || IsParent(focus, pWin)))
|
||||
event->focus = TRUE;
|
||||
|
||||
FixUpEventFromWindow(mouse->spriteInfo->sprite, (xEvent *) event, pWin,
|
||||
None, FALSE);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user