xserver-multidpi/dix
Peter Hutterer 9f462ff908 dix: Clip only into axis ranges if we're in absolute mode. (#26543)
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>
2010-03-10 09:30:19 +10:00
..
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
atom.c Constify atom name strings 2009-02-03 10:06:00 -08:00
buildatoms XFree86 4.3.0.1 2003-11-14 16:49:22 +00:00
BuiltInAtoms R6.6 is the Xorg base-line 2003-11-14 15:54:54 +00:00
colormap.c dix: Fix up colormap fixup. 2009-10-23 09:46:30 +09:00
cursor.c dix/configure: remove null root cursor option 2010-01-27 21:28:57 -08:00
deprecated.c dix: remove dixLookupResource - we don't have any users left. 2009-09-07 10:51:16 +10:00
devices.c dix: try to ring the bell even if the current device doesn't have one. (#24503) 2010-02-23 11:27:28 +10:00
dispatch.c Update Sun license notices to current X.Org standard form 2009-12-16 17:11:35 -08:00
dispatch.h Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
dixfonts.c dix: Fix potential memory corruption in doListFontsWithInfo. 2009-09-30 10:21:29 +10:00
dixutils.c Remove CopyISOLatin1Lowered 2009-10-15 08:08:23 -07:00
enterleave.c dix: call SetFocusOut and LeaveWindow when disabling a device. 2009-08-03 10:11:48 +10:00
enterleave.h dix: call SetFocusOut and LeaveWindow when disabling a device. 2009-08-03 10:11:48 +10:00
eventconvert.c dix: EventToCore needs to copy the root window too. 2010-01-27 14:38:16 -08:00
events.c dix: Use DeliverGrabbedEvent for implicit passive grabs (#25400) 2010-03-03 19:53:24 -08:00
extension.c dix: switch to byte-counting functions. 2009-07-14 10:05:54 +10:00
ffs.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
gc.c Replace dixLookupResource by dixLookupResourceBy{Type,Class} 2009-03-09 13:08:09 -07:00
getevents.c dix: Clip only into axis ranges if we're in absolute mode. (#26543) 2010-03-10 09:30:19 +10:00
globals.c DPMS: Remove the defaultDPMS* variables 2009-04-03 18:22:20 -04:00
glyphcurs.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
grabs.c input: remove XI2 keysym grabs, use keycode grabs instead. 2009-07-22 12:12:51 +10:00
initatoms.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
inpututils.c Un-export ApplyPointerMapping. This is an in-server function. 2009-09-03 08:39:26 +10:00
main.c dix: move config_init into the DDX. 2010-02-15 09:15:18 +10:00
Makefile.am dtrace: Add Xserver-dtrace.h to CLEANFILES 2009-12-15 16:51:48 -08:00
pixmap.c Remove a bunch of useless casts. 2009-01-22 02:11:16 -05:00
privates.c dix: Fix a double free in dixFreePrivates. 2009-10-07 16:22:46 -07:00
property.c dix: don't return BadMatch from GetProperty (#23562) 2009-09-03 14:19:35 +10:00
protocol.txt Add DRI2 requests to protocol.txt 2009-08-28 23:29:05 -04:00
ptrveloc.c dix: add smooth limited pointer acceleration profile 2010-01-01 11:22:42 -08:00
registry.c Correct outdated e-mail address in "Author" statements. 2009-09-02 17:56:52 -04:00
resource.c Add type name argument to CreateNewResourceType 2009-12-18 17:44:12 -08:00
selection.c xserver: Avoid sending uninitialized padding data over the network 2009-02-16 13:28:38 +10:00
swaprep.c dix: switch to byte-counting functions. 2009-07-14 10:05:54 +10:00
swapreq.c Remove #define NEED_EVENTS and NEED_REPLIES 2008-12-12 11:43:32 +10:00
tables.c Remove #define NEED_EVENTS and NEED_REPLIES 2008-12-12 11:43:32 +10:00
window.c dix: restore lastDeviceEventTime update in dixSaveScreens 2010-02-12 14:57:11 -08:00
Xserver-dtrace.h.in Update Sun license notices to current X.Org standard form 2009-12-16 17:11:35 -08:00
Xserver.d Update Sun license notices to current X.Org standard form 2009-12-16 17:11:35 -08:00