|
|
4724a4 |
From 19573148ff40b6b4eb335e92cb97ac97ec191450 Mon Sep 17 00:00:00 2001
|
|
|
4724a4 |
From: Adam Jackson <ajax@redhat.com>
|
|
|
4724a4 |
Date: Tue, 12 Aug 2014 13:32:07 -0400
|
|
|
4724a4 |
Subject: [PATCH] dix: Fix GrabPointer to not wrongly succeed on redirected
|
|
|
4724a4 |
windows
|
|
|
4724a4 |
|
|
|
4724a4 |
Not correct, but correcter. See upstream discussion for more details,
|
|
|
4724a4 |
hopefully this will get resolved properly in 1.16.
|
|
|
4724a4 |
|
|
|
4724a4 |
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
|
4724a4 |
---
|
|
|
4724a4 |
dix/events.c | 33 ++++++++++++++++++++++++++++++---
|
|
|
4724a4 |
1 file changed, 30 insertions(+), 3 deletions(-)
|
|
|
4724a4 |
|
|
|
4724a4 |
diff --git a/dix/events.c b/dix/events.c
|
|
|
4724a4 |
index b8c67fd..9300a3c 100644
|
|
|
4724a4 |
--- a/dix/events.c
|
|
|
4724a4 |
+++ b/dix/events.c
|
|
|
4724a4 |
@@ -3616,10 +3616,38 @@ ProcWarpPointer(ClientPtr client)
|
|
|
4724a4 |
return Success;
|
|
|
4724a4 |
}
|
|
|
4724a4 |
|
|
|
4724a4 |
+/*
|
|
|
4724a4 |
+ * this is better but still wrong. upstream discussion:
|
|
|
4724a4 |
+ * http://lists.freedesktop.org/archives/xorg-devel/2014-July/043374.html
|
|
|
4724a4 |
+ *
|
|
|
4724a4 |
+ * in the meantime all we're doing is amending the redirected window path
|
|
|
4724a4 |
+ * to check whether borderClip (total window area) overlaps the root window
|
|
|
4724a4 |
+ * space at all.
|
|
|
4724a4 |
+ *
|
|
|
4724a4 |
+ * note that the redirect path doesn't need to account for panoramix'
|
|
|
4724a4 |
+ * rewrite of root window geometry, because root windows can't be
|
|
|
4724a4 |
+ * redirected.
|
|
|
4724a4 |
+ */
|
|
|
4724a4 |
+static Bool
|
|
|
4724a4 |
+WindowIsConfineToAble(WindowPtr pWin)
|
|
|
4724a4 |
+{
|
|
|
4724a4 |
+ if (pWin->redirectDraw == RedirectDrawNone) {
|
|
|
4724a4 |
+ if (RegionNotEmpty(&pWin->borderSize))
|
|
|
4724a4 |
+ return TRUE;
|
|
|
4724a4 |
+ } else {
|
|
|
4724a4 |
+ WindowPtr root = pWin->drawable.pScreen->root;
|
|
|
4724a4 |
+ if (rgnOUT != RegionContainsRect(&pWin->borderClip,
|
|
|
4724a4 |
+ RegionExtents(&root->winSize)))
|
|
|
4724a4 |
+ return TRUE;
|
|
|
4724a4 |
+ }
|
|
|
4724a4 |
+
|
|
|
4724a4 |
+ return FALSE;
|
|
|
4724a4 |
+}
|
|
|
4724a4 |
+
|
|
|
4724a4 |
static Bool
|
|
|
4724a4 |
BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin)
|
|
|
4724a4 |
{
|
|
|
4724a4 |
- if (RegionNotEmpty(&pWin->borderSize))
|
|
|
4724a4 |
+ if (WindowIsConfineToAble(pWin))
|
|
|
4724a4 |
return TRUE;
|
|
|
4724a4 |
|
|
|
4724a4 |
#ifdef PANORAMIX
|
|
|
4724a4 |
@@ -3627,8 +3655,7 @@ BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin)
|
|
|
4724a4 |
int i;
|
|
|
4724a4 |
|
|
|
4724a4 |
FOR_NSCREENS_FORWARD_SKIP(i) {
|
|
|
4724a4 |
- if (RegionNotEmpty
|
|
|
4724a4 |
- (&pDev->spriteInfo->sprite->windows[i]->borderSize))
|
|
|
4724a4 |
+ if (WindowIsConfineToAble(pDev->spriteInfo->sprite->windows[i]))
|
|
|
4724a4 |
return TRUE;
|
|
|
4724a4 |
}
|
|
|
4724a4 |
}
|
|
|
4724a4 |
--
|
|
|
4724a4 |
1.9.3
|
|
|
4724a4 |
|