xserver: Branch 'mpx' - 5 commits
Peter Hutterer
whot at kemper.freedesktop.org
Mon Dec 3 21:49:58 PST 2007
dix/devices.c | 46 ----------------------------------------------
dix/dispatch.c | 1 -
dix/events.c | 31 ++++++++++++++++---------------
hw/kdrive/ephyr/ephyr.c | 2 +-
include/input.h | 1 -
xkb/xkbAccessX.c | 2 +-
6 files changed, 18 insertions(+), 65 deletions(-)
New commits:
commit 28b93d74a11a1064d68a214fcaa7b0aede864a38
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date: Mon Dec 3 14:32:53 2007 +1030
ephyr: miPointerWarpCursor needs the device parameter.
Thanks to Mitchell Quille for spotting it.
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index 52f5dcf..efcca5a 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -829,7 +829,7 @@ ephyrWarpCursor (ScreenPtr pScreen, int x, int y)
{
ephyrBlockSigio ();
ephyrCurScreen = pScreen->myNum;
- miPointerWarpCursor (pScreen, x, y);
+ miPointerWarpCursor (inputInfo.pointer, pScreen, x, y);
ephyrUnblockSigio ();
}
commit 004876355b43fb4d3c2bc5653a7dc1bfd3f985ee
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date: Fri Nov 30 13:56:04 2007 +1030
dix: Remove RegisterPairingClient and UnregisterPairingClient.
diff --git a/dix/devices.c b/dix/devices.c
index 4c9c4fb..59db509 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -2371,11 +2371,6 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd)
if (ptr->spriteInfo->paired)
return BadDevice;
- if (!pairingClient)
- RegisterPairingClient(client);
- else if (client && pairingClient != client)
- return BadAccess;
-
if (kbd->spriteInfo->spriteOwner)
{
xfree(kbd->spriteInfo->sprite);
@@ -2409,11 +2404,6 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
if (master && !master->isMaster) /* can't attach to slaves */
return BadDevice;
- if (!pairingClient)
- RegisterPairingClient(client);
- else if (client && pairingClient != client)
- return BadAccess;
-
/* set from floating to floating? */
if (!dev->u.master && !master)
return Success;
@@ -2495,39 +2485,6 @@ GetPairedDevice(DeviceIntPtr dev)
return dev->spriteInfo->paired;
}
-/*
- * Register a client to be able to pair devices.
- */
-Bool
-RegisterPairingClient(ClientPtr client)
-{
- if (!pairingClient)
- {
- pairingClient = client;
- } else if (pairingClient != client)
- {
- return False;
- }
- return True;
-}
-
-/*
- * Unregister pairing client;
- */
-Bool
-UnregisterPairingClient(ClientPtr client)
-{
- if (pairingClient)
- {
- if ( pairingClient == client)
- {
- pairingClient = NULL;
- } else
- return False;
- }
- return True;
-}
-
/* Guess a pointer that could be a good one for pairing. Any pointer that is
* not yet paired with keyboard is considered a good one.
* If no pointer is found, the last real pointer is chosen. If that doesn't
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 5e43902..34b0de1 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -3572,7 +3572,6 @@ CloseDownClient(ClientPtr client)
ReleaseActiveGrabs(client);
DeleteClientFontStuff(client);
ACUnregisterClient(client);
- UnregisterPairingClient(client); /* other clients can pair devices */
if (!really_close_down)
{
/* This frees resources that should never be retained
diff --git a/include/input.h b/include/input.h
index 9e73dc2..c436943 100644
--- a/include/input.h
+++ b/include/input.h
@@ -475,7 +475,6 @@ extern int AttachDevice(ClientPtr client,
extern DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd);
extern Bool RegisterPairingClient(ClientPtr client);
-extern Bool UnregisterPairingClient(ClientPtr client);
extern DeviceIntPtr GuessFreePointerDevice(void);
extern DeviceIntPtr NextFreePointerDevice(void);
commit 6216abe0c1a94efa4b2f0d14e88278f128304cd2
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date: Fri Nov 30 11:34:24 2007 +1030
dix: avoid activating the VCP/VCK twice.
This may set dev->key-xkbinfo to NULL, causing a segfault in xkb code lateron.
Spotted by David Huggins-Daines.
diff --git a/dix/devices.c b/dix/devices.c
index 98cd290..4c9c4fb 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -572,9 +572,6 @@ InitCoreDevices(void)
if (!AllocateDevicePrivate(inputInfo.pointer, CoreDevicePrivatesIndex))
FatalError("Couldn't allocate pointer devPrivates\n");
inputInfo.pointer->devPrivates[CoreDevicePrivatesIndex].ptr = NULL;
-
- ActivateDevice(inputInfo.keyboard);
- ActivateDevice(inputInfo.pointer);
}
/**
commit 9eb8ea9e615ebd8b568711eeca36aa84aa781ad3
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date: Fri Nov 30 11:32:59 2007 +1030
dix: only freeze the paired MD on a grab, not all other devices.
diff --git a/dix/events.c b/dix/events.c
index 43f4e37..418079d 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -1520,23 +1520,24 @@ CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
CLIENT_BITS(grab->resource)))
thisDev->deviceGrab.sync.other = NullGrab;
}
- /* XXX: other should only work on the paired keyboard, not on all other
- devices
+
+ /*
+ XXX: Direct slave grab won't freeze the paired master device.
+ The correct thing to do would be to freeze all SDs attached to the
+ paired master device.
*/
- for (dev = inputInfo.devices; dev; dev = dev->next)
+ if (thisDev->isMaster)
{
- if (dev != thisDev)
- {
- if (otherMode == GrabModeSync)
- dev->deviceGrab.sync.other = grab;
- else
- { /* free both if same client owns both */
- if (dev->deviceGrab.sync.other &&
- (CLIENT_BITS(dev->deviceGrab.sync.other->resource) ==
- CLIENT_BITS(grab->resource)))
- dev->deviceGrab.sync.other = NullGrab;
- }
- }
+ dev = GetPairedDevice(thisDev);
+ if (otherMode == GrabModeSync)
+ dev->deviceGrab.sync.other = grab;
+ else
+ { /* free both if same client owns both */
+ if (dev->deviceGrab.sync.other &&
+ (CLIENT_BITS(dev->deviceGrab.sync.other->resource) ==
+ CLIENT_BITS(grab->resource)))
+ dev->deviceGrab.sync.other = NullGrab;
+ }
}
ComputeFreezes();
}
commit e4fe0a3cb789b8757f1c80f606dfe32bccada582
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date: Thu Nov 29 09:55:24 2007 +1030
xkb: swap a LookupKeyboardDevice over in favour of GetPairedDevice
The former always returns the VCK, which is obviously wrong if we have
multiple devices.
diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
index 063c844..b26c918 100644
--- a/xkb/xkbAccessX.c
+++ b/xkb/xkbAccessX.c
@@ -691,7 +691,7 @@ ProcessPointerEvent( register xEvent * xE,
register DeviceIntPtr mouse,
int count)
{
-DeviceIntPtr dev = (DeviceIntPtr)LookupKeyboardDevice();
+DeviceIntPtr dev = GetPairedDevice(mouse);
XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
unsigned changed = 0;
ProcessInputProc backupproc;
More information about the xorg-commit
mailing list