Commit Graph

5794 Commits

Author SHA1 Message Date
Peter Hutterer
5ebe76f13f config: init dev to NULL to shut up a valgrind warning. 2008-06-02 10:26:03 +09:30
Peter Hutterer
a7ae9cbd78 dix: don't read valuators past numAxes. 2008-06-02 10:25:52 +09:30
Peter Hutterer
f79ad5674e kdrive: fix up callers to KdQueueEvent, need to pass xEvent, not EventListPtr 2008-05-31 18:46:35 +09:30
Peter Hutterer
58d12c99ab mi: Remove #ifdef XINPUT, kdrive otherwise won't get events. 2008-05-31 18:45:11 +09:30
Peter Hutterer
942086fc96 dix: ProcQueryPointer doesn't need special grab handling, PickPointer does it 2008-05-31 18:17:49 +09:30
Peter Hutterer
6cecae0e86 dix: Remove superfluous comment.
This code can handle devices with < 2 valuators now.
2008-05-31 17:42:06 +09:30
Peter Hutterer
105d28652d Xext: use GPE/GKE from XTestFakeInput #16145
This commit fixes two problems:
1) XTFI used to assemble the event itself, then passed it to the device. It's
much easier to just pass the variables into GPE/GKE and let the DIX do the
rest.

2) XTFI would pass the VCP/VCK as default device to event processing. As a
result, updating LEDs would be updated on the VCK, not on the actual keyboard.
Instead, we now pass the events through the last-used SD, thus toggling the
LEDs on the last keyboard that sent through this MD.

Also some cleanup in XTFI to merge validity checks a bit closer together
rather than having several different sections.

This breaks XTestFakeMotion with Xinerama though.

X.Org Bug 16145 <http://bugs.freedesktop.org/show_bug.cgi?id=16145>
2008-05-31 17:42:06 +09:30
Peter Hutterer
341a61b608 mi: reduce noisyness. DebugF is enough if device ID can't be changed.
Also - printing out the event type is actually helpful.
2008-05-31 17:42:05 +09:30
Peter Hutterer
62c1a32976 dix: null out dummyDev, otherwise Xephyr dereferences random pointers.
SendEventToAllWindow eventually causes a IsInterferingGrab(), which attempts
to dereference dev->deviceGrab.grab.
2008-05-31 17:42:05 +09:30
Julien Cristau
150c2f55a5 Add xkbstr.h and xkbsrv.h to sdk_HEADERS 2008-05-30 00:27:39 +02:00
Peter Hutterer
f9bcecbe51 Xext: only free events in case of core motion events. 2008-05-29 18:14:54 +09:30
Peter Hutterer
8cf7755a85 Require x11proto 7.0.13, xextproto 7.0.4 and inputproto 1.9.99.1 2008-05-28 18:05:25 +09:30
Peter Hutterer
9b544fa400 mi: ansify. 2008-05-28 14:23:08 +09:30
Peter Hutterer
64677f6a16 xfree86: fix offset error in EDID parsing. #15964
X.Org Bug 15964 <http://bugs.freedesktop.org/show_bug.cgi?id=15964>
2008-05-27 21:18:35 +09:30
Paulo Cesar Pereira de Andrade
c8af7ce35a Correct a NULL pointer deference
The problem happens if Monitor/Card combo doesn't provide EDID info,
and the XFree86-VidModeExtension extension is used.

Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-05-27 15:20:28 +09:30
Peter Hutterer
3a1278907e xfree86: Bump XINPUT ABI to 3.0. 2008-05-26 18:14:31 +09:30
Simon Thum
0050165a67 input: change dxremaind, dyremaind to floats for better acceleration #9156
X.Org Bug 9156 <http://bugs.freedesktop.org/show_bug.cgi?id=9156>

Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-05-26 17:58:07 +09:30
Peter Hutterer
26c1958c32 Merge branch 'master' into mpx 2008-05-26 17:37:31 +09:30
Peter Hutterer
5fe57787fa dix: store the absolute values in the motion history.
The core protocol requires absolute values and it's a bit hard to get them if
we only have relative ones in the history. Switch the motion history to
absolute, and if we really need the relative values, we can probably generated
them from the abs. ones in the future.
2008-05-26 17:27:32 +09:30
Peter Hutterer
1883485edd If core motion history is required, scale back to screen coords and INT16. 2008-05-26 17:22:25 +09:30
Peter Hutterer
0b88510069 Ensure the motion history is merged for master devices.
Add each event to the master's MH as well as to the SDs. In the MD, store
min/max and the actual value. When retrieving the MH, rescale all coordinates
to the current coordinate range and only post those valuators that are
currently active on the device.
2008-05-26 15:55:20 +09:30
Peter Hutterer
d22c25bda4 dix: Allocate MD's motion history to be large enough for potential valuators
Since we can't predict how many valuators may be in a future SD attached to an
MD, we need to preallocate a history buffer that is large enough to keep
MAX_VALUATORS coordinates per event.

In addition, the history buffer needs to memorize the coordinate ranges at the
time, thus requiring MDs to store (min_val, max_val, current_val, time)
instead of (current_val, time) for each motion history entry.

This commit only fixes the allocation.
2008-05-26 09:26:18 +09:30
Peter Hutterer
0877de13ac Remove GetMotionProc from ValuatorClassRec.
With the MD/SD device hierarchy we need control over the generation of the
motion history as well as the conversion later before posting it to the
client. So let's not let the drivers change it.

No x.org driver currently uses it anyway, linuxwacom doesn't either so dumping
it seems safe enough.
2008-05-25 22:49:54 +09:30
Peter Hutterer
00b4339168 dmx: remove some #if 0'd code. 2008-05-25 22:34:11 +09:30
Peter Hutterer
096117cf02 Xi: reset motion history when swapping device classes.
This isn't really the correct solution, but it'll have to do until I figured
out how to transfer the history over correctly.
2008-05-25 10:38:33 +09:30
Michel Dänzer
29586101dc EXA: Only record damage generated by rendering operations.
Recording damage from other operations (e.g. creating a client damage record)
may confuse the migration code resulting in corruption.

Option "EXAOptimizeMigration" appears safe now, so enable it by default. Also
remove it from the manpage, as it should only be necessary on request in the
course of bug report diagnostics anymore.
2008-05-24 20:01:41 +02:00
Michel Dänzer
f6d61d3d86 EXA: Don't migrate twice in exaImageGlyphBlt.
exaPrepareAccess already handles migration.
2008-05-24 20:01:36 +02:00
Michel Dänzer
d733043982 EXA: Don't suggest exaCopyDirty be inlined.
Leave the decision to the compiler toolchain.
2008-05-24 20:01:31 +02:00
Michel Dänzer
3baf3b42e0 EXA: Specify region used for source pixmap migration in exaCopyNtoN.
Avoids excessive migration overhead in some pathological cases. See
http://bugs.freedesktop.org/show_bug.cgi?id=15845 .
2008-05-24 20:01:21 +02:00
Peter Hutterer
ba557e0263 Xi: remove deprecated comment.
Axis clipping wouldn't be necessary here, it's already performed in GPE.
2008-05-24 17:23:10 +09:30
Julien Cristau
e6cbb1e11e xfree86: fix build on GNU/kFreeBSD
GNU/kFreeBSD defines __FreeBSD_kernel__, but not __FreeBSD__.
Unify preprocessor conditionals between variable declaration and use.
Debian bug #482550.
2008-05-23 23:01:24 +02:00
George Sapountzis
6c72961d8f glx: fix memory corruption with r5g6b5
should cherry-pick to xserver-1.5
2008-05-23 22:40:26 +03:00
George Sapountzis
21a8052fdc glx: fix forgotten swrast -> SWRast 2008-05-23 22:40:26 +03:00
George Sapountzis
877e6c35ff glx: missing swrast is fatal 2008-05-23 22:40:26 +03:00
George Sapountzis
1345c93ad4 glx: drop stray glcore.h include 2008-05-23 22:40:25 +03:00
George Sapountzis
ae0504d34d kdrive: need not export symbols for glx anymore 2008-05-23 22:40:25 +03:00
Jeremy Huddleston
7082929ef7 XQuartz: A 2 second delay for launchd socket connections should be sufficient.
(cherry picked from commit 2bb4251b3c)
2008-05-23 02:32:37 -07:00
Jeremy Huddleston
5a388b27a0 XQuartz: Add the launchd fd to AllSockets as well
(cherry picked from commit 83f7252939)
2008-05-23 02:32:32 -07:00
Jeremy Huddleston
77b688a730 XQuartz: Don't need launchd checking in configure.ac anymore since its functionality has been removed from libxtrans and into the mach startup code.
(cherry picked from commit 1e1f4fb717)
2008-05-23 02:32:28 -07:00
Jeremy Huddleston
225dddbaed XQuartz: Move the launchd display grabbing into mach_startup
(cherry picked from commit c3866c98d2)
2008-05-23 02:31:41 -07:00
Jeremy Huddleston
3a22190061 XQuartz: Fixed a few issues with fd passing... still not working =(
(cherry picked from commit 7dd3512715)
2008-05-23 02:31:38 -07:00
Peter Hutterer
3ae0f4fc83 dix: update valuators > 2 as well.
master->last.valuator[x] for x > 2 is undefined. For all other devices, it's
the respective device's last valuators.

If the lastSlave did not have a valuator that is to be updated now, it is
reset to 0.
2008-05-23 15:52:40 +09:30
Peter Hutterer
0d1b41ace3 Xi: update device valuators based on the event.
Event is always absolute, update the device's valuators (always absolute too),
and then change the deviceValuator event to reflect the device's reporting
mode.
2008-05-23 13:32:33 +09:30
Peter Hutterer
7eec1c23a3 dix: don't allow relative data in deviceValuators.
In GPE, we don't care about the device mode. Let's put the absolute values
into the deviceValuator event and worry about relative valuators on the other
side of the EQ.
2008-05-23 13:23:02 +09:30
Peter Hutterer
75551a2ef9 Revert "dix: Correct values in the device axisVal are calculated in GPE"
We can't rely on GPE to update device->valuators->axisVal. If a SIGIO occurs
during event processing this may have incoherent results.

This reverts commit f6645ddbf7.
2008-05-23 12:55:50 +09:30
Peter Hutterer
fe59b1a62b dix: more device scaling insanity.
Assuming master->last.valuators is in screen coords, SD's are always in device
coordinates.

1. If an event comes in, scale masters->last to the device, drop into device's
last->valuators.
2. Apply motion from the actual event
3. Scale back to screen coords, check if we may need to cross screens
4. Drop screen coords into master->last
5. Rescale to device coords, drop into deviceValuator event and SD->last
6. Drop screen coords into ev->root_x/y

Whoopee...
2008-05-23 12:51:52 +09:30
Peter Hutterer
6c9e9f8a40 input: instead of lastx/y, use a last.valuators[] array on the device.
During GetPointerEvents (and others), we need to access the last coordinates
posted for this device from the driver (not as posted to the client!). Lastx/y
is ok if we only have two axes, but with more complex devices we also need to
transition between all other axes.

ABI break, recompile your input drivers.
2008-05-23 12:01:37 +09:30
Peter Hutterer
fb146cbb0f dix: coreEvents doesn't have meaning here, use master instead.
We mustn't clip x/y if we are attached, otherwise we can't change screens.
2008-05-23 12:01:09 +09:30
Magnus Vigerlöf
fc1cc0adcb dix: Cleanup of GetPointerEvents
Changed all the checks for x&y valuator so the more complex
calculation is only made once.
Added TODOs for valuator/axis 2 and above for future correct
handling of relative reporting of these.

Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-05-23 09:33:09 +09:30
Magnus Vigerlöf
a0241d5380 dix: Correct clipAxis so it can handle devices with value ranges properly
Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-05-23 09:30:43 +09:30