When setting an input pointer as a floating slave (xinput float <deviceid>), and then rotating the screen with RandR (xrandr -o left), the device coordinate boundaries are not swapped accordingly. Which means that if I have a 1366x768 screen, the device will be locked at 768 in width after rotating, having an effective reach of 768x768, leaving 459264 sad pixels that cannot be clicked or hovered anymore. If I reattach the device with a master and float it again, it's properly rotated. But I have to do that everytime I rotate the screen. I tested and reproduced this with xserver 1.11 and xinput test-xi2.
It sounds like RandR needs to be hit upside the head by Peter. It should be easy enough to adjust the floating pointer bounds in RandR, so let's try to fix this for 1.12.
http://patchwork.freedesktop.org/patch/8672/
I've tested the patch on xserver 1.7 (a bit modified, see below), it works as intended. Thanks a lot! Index: xorg-server-1.7.7/dix/events.c =================================================================== --- xorg-server-1.7.7.orig/dix/events.c 2012-01-09 11:26:35.000000000 +0100 +++ xorg-server-1.7.7/dix/events.c 2012-01-09 11:48:17.000000000 +0100 @@ -1355,7 +1355,7 @@ for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if (!DevHasCursor(pDev)) + if (!(GetMaster(pDev, MASTER_KEYBOARD) == NULL) && !DevHasCursor(pDev)) continue; /* GrabDevice doesn't have a confineTo field, so we don't need to I can now throw away the fugly code I had written to workaround this bug: void attach_and_float(Display *display, XIDeviceInfo *master, XIDeviceInfo *slave) { XIDetachSlaveInfo detach = { .type = XIDetachSlave, .deviceid = slave->deviceid, }; XIAttachSlaveInfo reattach = { .type = XIAttachSlave, .deviceid = slave->deviceid, .new_master= master->deviceid, }; XIChangeHierarchy(display, (XIAnyHierarchyChangeInfo*)&reattach, 1); XIChangeHierarchy(display, (XIAnyHierarchyChangeInfo*)&detach, 1); }
Reopening. This should not be closed until it is actually in a release.
Correction, I meant until it is actually on a release branch.
commit 35bd77e9d0701daae87d681900d749604fc6471f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jan 9 15:04:10 2012 +1000 dix: Update pointer limits for floating devices too (#43635)
This is also on server-1.11-branch
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.