9f462ff908
An absolute device in relative mode may provide valuators outside of the axis range. Clipping back into the range prevents screen crossings in a multi-screen (Xinerama) setup as the required screen edge for crossing is never met: miPointerSetPosition crosses the screen conditional to the X coordinate being equal to the screen width or _less than_ 0. While the former can be met when clipping into the coordinate range and scaling, the latter cannot, resulting in a mouse pointer that gets stuck on the rightmost screen. This patch only applies axis clipping for valuators in mode Absolute. If relative, we allow the values to get above/below the axis ranges. Doesn't matter, miPointerSetPosition will reset the values to the allowed range even if no screen was crossed. This leads to interesting values provided to clients, the valuator range of the device resets once a screen is crossed and essentially reflects the position of the cursor on the screen - scaled into the valuator range. The values themselves are valid given the range though. In theory, the XI1 specs require that a relative device has a min/max range of 0/0. This doesn't really go well with devices that actually can switch mode between relative and absolute since they would have to reset their axis range when switching. If multiple XI clients are in use, we have no method of notifying them about the changes, so other clients may continue to use the wrong axis ranges (note: XI1 wasn't really designed to have multiple clients use a device). Expecting all relative devices to have this min/max of 0 is unrealistic at this point. So pick what is possibly the lesser of all evils, pass the beer and despair. X.Org Bug 26543 <http://bugs.freedesktop.org/show_bug.cgi?id=26543> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> |
||
---|---|---|
.. | ||
.gitignore | ||
atom.c | ||
buildatoms | ||
BuiltInAtoms | ||
colormap.c | ||
cursor.c | ||
deprecated.c | ||
devices.c | ||
dispatch.c | ||
dispatch.h | ||
dixfonts.c | ||
dixutils.c | ||
enterleave.c | ||
enterleave.h | ||
eventconvert.c | ||
events.c | ||
extension.c | ||
ffs.c | ||
gc.c | ||
getevents.c | ||
globals.c | ||
glyphcurs.c | ||
grabs.c | ||
initatoms.c | ||
inpututils.c | ||
main.c | ||
Makefile.am | ||
pixmap.c | ||
privates.c | ||
property.c | ||
protocol.txt | ||
ptrveloc.c | ||
registry.c | ||
resource.c | ||
selection.c | ||
swaprep.c | ||
swapreq.c | ||
tables.c | ||
window.c | ||
Xserver-dtrace.h.in | ||
Xserver.d |