From 0b485067823620b5dbd9ef2b3e13bd35ad5a4410 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 3 Oct 2007 14:22:55 +0930 Subject: [PATCH] dix: send NotifyGrab/NotifyUngrab focus events regardless of semaphore state. This is just papering over a problem. The whole focus system needs to be revised. --- dix/events.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dix/events.c b/dix/events.c index 35abffd80..64892920b 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4374,7 +4374,7 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) * For standard events (NotifyAncestor, NotifyInferior, NotifyNonlinear) * we only send an FocusIn event for the first kbd to set the focus. A * FocusOut event is sent for the last kbd to set the focus away from the - * window.. + * window. * * For events with Virtual detail, we send them only to a window that does * not have a focus from another keyboard. @@ -4392,7 +4392,9 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) numFoci = &((FocusSemaphoresPtr)pWin->devPrivates[FocusPrivatesIndex].ptr)->focusinout; - if (detail != NotifyVirtual && + if (mode == NotifyGrab || mode == NotifyUngrab) + sendevent = TRUE; + else if (detail != NotifyVirtual && detail != NotifyNonlinearVirtual && detail != NotifyPointer && detail != NotifyPointerRoot &&