summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Bosveld <Joel.Bosveld@gmail.com>2009-08-17 15:26:32 +0800
committerJoel Bosveld <Joel.Bosveld@gmail.com>2009-08-17 15:26:32 +0800
commit5e38708c3466129c3e5af40a915c044bb26e083f (patch)
tree6d3a5c26d3b7e20f724cb8d21026a580f82008c3
parent0867820bd0df43348a38fc0228d73cdccf66add3 (diff)
composite: use the correct device to determine windows input redirection
The code in mieq was getting called with the slave device, and so was not using the correct window for redirection. This was causing problems with confine_to and grabs (viz. they didn't work)
-rw-r--r--composite/compwindow.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/composite/compwindow.c b/composite/compwindow.c
index 8e9a04200..a16a127a3 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -1239,6 +1239,8 @@ CompositeGetUnredirectedWindowInput (DeviceIntPtr pDev,
{
CompIRWindowPtr ciw = GetCompIRWindow (pWin);
+ pDev = pDev->spriteInfo->spriteOwner ? pDev : pDev->spriteInfo->paired;
+
return ciw && pDev && ciw->unredirectedWindow[pDev->id] ?
ciw->unredirectedWindow[pDev->id] : pWin;
}
@@ -1248,8 +1250,11 @@ CompositeGetRedirectedWindowInput (DeviceIntPtr pDev,
WindowPtr pWin)
{
CompClientIRWindowPtr cciw = GetCompClientIRWindow (pWin);
- WindowPtr pGrabWin = pDev->deviceGrab.grab ?
- pDev->deviceGrab.grab->window : NULL;
+ WindowPtr pGrabWin;
+
+ pDev = pDev->spriteInfo->spriteOwner ? pDev : pDev->spriteInfo->paired;
+ pGrabWin = pDev->deviceGrab.grab ? pDev->deviceGrab.grab->window : NULL;
+
/* During a grab we don't want to update the unredirectedWindow, but just
* keep using the one that was being used when grab activated. However, if
* the window isn't part of the hierachy of the grabbed window, we should