aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/devices.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-04 08:57:20 +0100
committermarha <marha@users.sourceforge.net>2011-11-04 08:57:20 +0100
commit02f377d5e2dd18537d0807ad63675a0970b5a37d (patch)
tree1814c826db4d95a30ad71431d9c84b8d2611ec18 /xorg-server/dix/devices.c
parent6f4feafd4d22beaabfb0202e66b0dea9047ee084 (diff)
downloadvcxsrv-02f377d5e2dd18537d0807ad63675a0970b5a37d.tar.gz
vcxsrv-02f377d5e2dd18537d0807ad63675a0970b5a37d.tar.bz2
vcxsrv-02f377d5e2dd18537d0807ad63675a0970b5a37d.zip
xserver pixman mesa git update 4 nov 2011
Diffstat (limited to 'xorg-server/dix/devices.c')
-rw-r--r--xorg-server/dix/devices.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index 7c196e077..da817a8af 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -612,6 +612,7 @@ CorePointerProc(DeviceIntPtr pDev, int what)
int i = 0;
Atom btn_labels[NBUTTONS] = {0};
Atom axes_labels[NAXES] = {0};
+ ScreenPtr scr = screenInfo.screens[0];
switch (what) {
case DEVICE_INIT:
@@ -638,10 +639,11 @@ CorePointerProc(DeviceIntPtr pDev, int what)
pDev->name);
return BadAlloc; /* IPDS only fails on allocs */
}
- pDev->valuator->axisVal[0] = screenInfo.screens[0]->width / 2;
- pDev->last.valuators[0] = pDev->valuator->axisVal[0];
- pDev->valuator->axisVal[1] = screenInfo.screens[0]->height / 2;
- pDev->last.valuators[1] = pDev->valuator->axisVal[1];
+ /* axisVal is per-screen, last.valuators is desktop-wide */
+ pDev->valuator->axisVal[0] = scr->width / 2;
+ pDev->last.valuators[0] = pDev->valuator->axisVal[0] + scr->x;
+ pDev->valuator->axisVal[1] = scr->height / 2;
+ pDev->last.valuators[1] = pDev->valuator->axisVal[1] + scr->y;
break;
case DEVICE_CLOSE:
@@ -985,6 +987,8 @@ CloseDownDevices(void)
{
DeviceIntPtr dev;
+ OsBlockSignals();
+
/* Float all SDs before closing them. Note that at this point resources
* (e.g. cursors) have been freed already, so we can't just call
* AttachDevice(NULL, dev, NULL). Instead, we have to forcibly set master
@@ -1007,6 +1011,8 @@ CloseDownDevices(void)
inputInfo.keyboard = NULL;
inputInfo.pointer = NULL;
XkbDeleteRulesDflts();
+
+ OsReleaseSignals();
}
/**