Commit Graph

7711 Commits

Author SHA1 Message Date
Peter Hutterer
59358de4b6 input: ensure various ProcUngrabKey/Buttons have the right grabtype set. 2009-05-04 17:40:29 +10:00
Peter Hutterer
834ea071b6 dix: if grab types differ, two grabs cannot be the same. 2009-05-04 17:40:25 +10:00
Peter Hutterer
63a3c727b3 Xext: shut up compiler warnings in xtest.c
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-04 15:21:39 +10:00
Peter Hutterer
226dd90597 Xext: return BadDevice from XTest if we don't have keys/buttons/valuators.
BadDevice is an XI error, but this cannot happen for core XTest fake input
anyway since the device will be the matching virtual XTest slave device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-04 15:21:39 +10:00
Peter Hutterer
0fdff0a47a Xext: fix core Xtest button presses, don't call PickPointer.
We already did the device selection before, so dev should be the XTest virtual
pointer.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-04 15:21:39 +10:00
Peter Hutterer
f0124ed93c include: up the number of max. input devices to 40.
With the Xtest virtual slave devices we have 4 devices for each MD
pointer/keyboard pair, plus the AllDevices and AllMasterDevices reserved
deviceids. It's quite easy to hit the current limit.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-04 15:21:39 +10:00
Peter Hutterer
08cd846000 dix: only free the old cursor if the grab was successful.
Testcase: start thunderbird and move a message around, crashes after two or
three moves.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-04 15:21:38 +10:00
Peter Hutterer
3d30789a05 mi: don't crash if we're trying to update the pointer for a keyboard.
If a device doesn't have a pointer, just return.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-01 09:07:39 +10:00
Peter Hutterer
876910a951 xkb: write the _XKB_RF_RULES_PROP to each device.
We only have one root window and writing the rules used to the same property
for each device is quite pointless if you don't have the same RMLVO on all
devices. So let's be sensible and write the same property to the device too,
so at least we know which device got loaded with which RMLVO.
2009-05-01 09:07:39 +10:00
Peter Hutterer
44044adc92 xfree86: print a message if NIDR fails due to AutoAddDevices off.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-01 09:07:39 +10:00
Peter Hutterer
43dbbc3032 Xi: fix typo in ProcXIGrabDevice
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-01 09:07:39 +10:00
Peter Hutterer
6a618929a0 input: reshuffle CreateGrab and friends to take a GrabParameters param.
This is cleaning up work in preparation for XI2 passive grabs.
2009-05-01 09:07:37 +10:00
Peter Hutterer
e8e26f700c Xi: split some grab parameter checking out of GrabButton and GrabKey. 2009-05-01 09:06:33 +10:00
Peter Hutterer
98a1fa9941 test: add InternalEvent to core event conversion tests.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-28 16:03:56 +10:00
Peter Hutterer
990e8362a7 test: add a simple test to verify device axis intialization.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-28 16:03:56 +10:00
Peter Hutterer
4eac0df060 Add a test-suite for in-server unit-testing.
This patch adds a test/ directory that contains the setup for a unit-testing
suite designed for in-server unit-testing. All functions available to the X
server are available to the test binaries through static linking.

This test suite uses the glib testing framework.
Do not use glib calls outside of the test/ directory.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-28 16:03:56 +10:00
Peter Hutterer
c2c515ead3 dix: remove all but main() from main.c
All other functions are pushed into where they seemed to fit.
main.c is now linked separately into libmain.a and linked in by the various
DDXs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-28 16:03:56 +10:00
Peter Hutterer
48573e7ea1 Xi: swap stuff->cursor in SProcXIGrabDevice 2009-04-26 21:32:37 +10:00
Peter Hutterer
057fc9a4f8 Merge branch 'master' into xi2
Conflicts:
	Xi/chdevhier.c
	include/input.h
2009-04-24 16:15:47 +10:00
Peter Hutterer
932d6bcbb6 mi: remove superfluous check.
mieqProcessInputEvents doesn't process events from MDs anymore, so we don't
need to check for pDev->isMaster.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-24 15:29:24 +10:00
Benjamin Close
fab563bf8f input: propagate XTst events through virtual slave devices.
A XTest virtual slave device pair (kbd/ptr) exists for every master
device pair. This is so XTest events are correctly propogated via slave
devices up to Master devices and the classes are correctly changed along
the way. We add the XTest slave device pair to the Virtual Core pointer
and provide a simple way of creating the devices.

A XTest Slave Device is identified by the XTstDevicePrivateKey property
being set in the devices devProperties

XI events are still propagated through the matching device, in the hope the
client knows what it is doing.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-24 15:28:33 +10:00
Jeremy Huddleston
ccd28ca2ad XQuartz: Localization update
(cherry picked from commit 9435fc5e20)
2009-04-22 19:30:33 -07:00
Jeremy Huddleston
a362d0f4fb XQuartz: Make sure the bgMouseLocationUpdated state is consistent
(cherry picked from commit 8fa8a8e1db)
2009-04-22 19:30:18 -07:00
Dave Airlie
8dc8812c22 exa: add missing exa.h header include 2009-04-23 12:13:35 +10:00
Dave Airlie
3ec6a121e1 exa: missed exa.h change 2009-04-23 12:13:05 +10:00
Dave Airlie
02ae85c4c9 exa: add CreatePixmap2 hook for driver pixmaps.
This adds a revised pixmap hook for driver pixmaps, which is
required to support tiling on various chips.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-04-23 12:04:17 +10:00
Dave Airlie
9d684ba0bc exa: avoid offscreen pixmap swapped out flag for driver pixmaps 2009-04-23 11:42:53 +10:00
Julien Cristau
0dfb97f15f Bug#21324: Add quirk for Iiyama Vision Master 450
Reported-by: Jeremy Henty <onepoint@starurchin.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2009-04-22 20:02:38 +02:00
Ian Romanick
44227ef1b7 DRI2: Send the version the code actually supports
This prevents building an older server with a new dri2proto.h from
resulting in a DRI2 extension module that lies about the version it
supports.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2009-04-20 20:58:56 -07:00
Ian Romanick
d1e916d29b DRI2: Add missing front-buffer flush callback.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2009-04-20 20:58:56 -07:00
Benjamin Close
826a5bff01 dix: Change AllocMaster into AllocDevicePair, allow creation of SDs too.
Allocating a slave device is essentially the same as allocating a master device.
Hence we rename AllocMaster to AllocDevicePair and provided the ability to
indicate if a master or slave device pair is required.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-21 13:11:51 +10:00
Peter Hutterer
e2e5932bda dix: don't allow more than MAX_VALUATORS on one device.
Some keyboards (?) advertise more than MAX_VALUATORS axes. Parts of the
internal event delivery relies on not having more than MAX_VALUATOR axes, so
let's cap it down.
If there's real devices that require more than the current 36, I'm sure we can
bump this up.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-21 13:11:51 +10:00
Julien Cristau
063833f3a6 Add XI 1.5 event and requests to protocol.txt 2009-04-20 12:50:34 +02:00
Julien Cristau
4f86ee61a4 Add RandR 1.3 requests to protocol.txt 2009-04-20 12:50:29 +02:00
Colin Harrison
6559f02ef8 xkb: set bell_func in InitKeyboardDeviceStruct.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-20 16:40:34 +10:00
Peter Hutterer
95628b797e Xi: use the XI2 defines for AsyncPair, SyncDevice, etc, not the XI ones.
And don't allow some values on SDs either.
2009-04-20 14:07:08 +10:00
Werner LEMBERG
335c63fcd6 Add newline to some LogMessage strings.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-20 12:38:08 +10:00
Peter Hutterer
d5ad14c8ed Merge branch 'master' into xi2 2009-04-19 22:28:22 +10:00
Peter Hutterer
54716fd3db Convert to using int32_t fixed point values on the wire.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:12 +10:00
Peter Hutterer
129ac9a914 dix: set root_x/y for device events.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:12 +10:00
Peter Hutterer
eeb1e4cd25 Xi: add support for XIAllowEvents.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:11 +10:00
Peter Hutterer
74d0fc3aee dix: don't allow more than MAX_VALUATORS on one device.
Some keyboards (?) advertise more than MAX_VALUATORS axes. Parts of the
internal event delivery relies on not having more than MAX_VALUATOR axes, so
let's cap it down.
If there's real devices that require more than the current 36, I'm sure we can
bump this up.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:11 +10:00
Peter Hutterer
edb70caf21 dix: remove un-used parameter "core" from AllowSome
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:11 +10:00
Peter Hutterer
bb5418d490 Xi: Add support for XI2 active grabs and ungrabs.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:11 +10:00
Peter Hutterer
c11ef87931 Xi: take XI2 requests into account when checking opcodes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:11 +10:00
Peter Hutterer
c94ea5bc05 input: use a GrabMask union in GrabDevice to allow for XI2 masks.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:11 +10:00
Peter Hutterer
6bb4b5b937 Xi: add XI2 grab protocol request handling.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:11 +10:00
Peter Hutterer
09f9a86077 input: replace GrabRec's coreGrab field with grabtype.
Don't allow grabs of different types to override each other.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:08 +10:00
Peter Hutterer
7fbe1b7d63 Xi: remove the GetExtensionVersion hack.
Squashing data into a request that's defined to be padding is probably not the
best idea.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:24:13 +10:00
Peter Hutterer
0e0642ee94 os: don't malloc memory in LogVMessageVerb.
LogVWrite is limited to a buffer size of 1024, so we don't loose anything here
by truncating. This way we can use LogVMessageVerb (and xf86Msg and friends)
during signal handlers with the normal message types.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-04-19 22:20:18 +10:00