On Wed, Feb 06, 2013 at 02:07:22PM +0100, Carlos Garnacho wrote:
> From: Carlos Garnacho <[email protected]>
>
> 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 <[email protected]>
applied, thank you.
Cheers,
Peter
> ---
> dix/events.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/dix/events.c b/dix/events.c
> index f72cdc7..2682ecd 100644
> --- a/dix/events.c
> +++ b/dix/events.c
> @@ -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);
>
> --
> 1.8.1
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel