summaryrefslogtreecommitdiff
path: root/Xext/xtest.c
AgeCommit message (Collapse)AuthorFilesLines
2009-08-27Xext: rename Xtst* to XTest*Peter Hutterer1-43/+43
This patch corrects a misnaming of XTest-related functions. The extension itself announces itself as XTEST. Xtst is the library name itself, but all library functions are prefixed by XTest. Same with the naming in the server. - Rename all *Xtst* functions to *XTest* for consistency with the library and in-server API. - Rename the "Xtst device" property to "XTEST device" for consistency with the extension naming. - Rename the device naming to "<master device name> XTEST device". The default xtest devices become "Virtual core XTEST pointer" and "Virtual core XTEST keyboard". Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-27input: move XTest device initialization into Xext/xtest.cPeter Hutterer1-0/+142
XTest devices are non-optional but nonetheless specific to the XTEST extension. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-24Xext: remove un-used extern of DeviceMotionNotify.Peter Hutterer1-1/+0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-13Xext: allocate a separate event list for XTest events (#23100)Peter Hutterer1-6/+11
XTest event processing may be interrupted by a SIGIO. If Xtest uses the same event list as the rest of the server, this list may be overwritten in-flight. X.Org Bug 23100 <http://bugs.freedesktop.org/show_bug.cgi?id=23100> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-15Update to xextproto 7.0.99.1.Peter Hutterer1-3/+1
xextproto had Xlib client headers moved into libXext. Protocol header files are named fooproto.h, header files with constants foo.h or fooconst.h where foo.h was already in use for client-side headers.
2009-07-06Xext: return BadValue for XTestFakeInput on unsupported capabilities.Peter Hutterer1-0/+23
Calling XTestFakeDevice*Event on a device that doesn't allow the matching event returns BadValue. Reported-by: Florian Echtler Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-06Xext: remove unused variable 'it'.Peter Hutterer1-2/+0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-01input: store the master device's ID in the devPrivate for XTest devices.Peter Hutterer1-9/+1
Rather than storing a simple boolean in the devPrivate for XTest devices, store the actual master device's id (since it is constant for the life of the device anyway). Callers should use GetXtstDevice now instead of digging around in the devPrivates themselves. This patch allows for a cleanup in the creation of new master devices since GetMaster and GetXtstDevice spare the need for loops, IsPointer checks and similar. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Close <Benjamin.Close@clearchain.com>
2009-05-22Input: rename DeviceIntRec->isMaster to ->type.Peter Hutterer1-1/+1
isMaster is not enough as long as we differ between master pointers and keyboard. With flexible device classes, the usual checks for whether a master device is a pointer (currently check for ->button, ->valuators or ->key) do not work as an SD may post an event through a master and mess this check up. Example, a device with valuators but no buttons would remove the button class from the VCP and thus result in the IsPointerDevice(inputInfo.pointer) == FALSE. This will become worse in the future when new device classes are introduced that aren't provided in the current system (e.g. a switch class). This patch replaces isMaster with "type", one of SLAVE, MASTER_POINTER and MASTER_KEYBOARD. All checks for dev->isMaster are replaced with an IsMaster(dev).
2009-05-04Xext: shut up compiler warnings in xtest.cPeter Hutterer1-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-04Xext: return BadDevice from XTest if we don't have keys/buttons/valuators.Peter Hutterer1-0/+10
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-04Xext: fix core Xtest button presses, don't call PickPointer.Peter Hutterer1-6/+0
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-04-24input: propagate XTst events through virtual slave devices.Benjamin Close1-2/+13
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-03-27Xext: set POINTER_SCREEN flag in XTestFakeInput if necessary. (RH #490984)Peter Hutterer1-3/+11
The POINTER_SCREEN flag must be set explicitly for XTest core events to avoid out-of-range events when the lastSlave was an SD with an explicit axis range. Device events sent through XTest don't need this flag, they are expected to be in the valuator range of the device anyway. Red Hat Bug 490984 <https://bugzilla.redhat.com/show_bug.cgi?id=490984> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-09Replace dixLookupResource by dixLookupResourceBy{Type,Class}Keith Packard1-3/+3
dixLookupResource attempted to automatically detect whether the caller wanted a lookup by-type or by-class, unfortunately, it guessed wrong for RT_NONE. Instead of trying to make the guess better, this patch just reverts the unification and creates separate functions for each operation.
2009-02-23mi: split EQ popping and event processing into two functions.Peter Hutterer1-3/+1
mieqProcessInputEvents() - pop an event off the EQ and pass it to mieqProcessDeviceEvent() - process the event according to the MD/SD hierarchy. This way, we can use mieqPDE() from Xtest, xkb, and others to post an event. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22Input: Remove core keysyms from KeyClassRecDaniel Stone1-2/+4
Instead of always keeping two copies of the keymap, only generate the core keymap from the XKB keymap when we really need to, and use the XKB keymap as the canonical keymap. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-11Xext: ANSI cleanupsJulien Cristau1-23/+11
2009-01-09Xext: Send out correct events in ProcXTestFakeInputThomas Jaeger1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-09Xext: don't accept DeviceValuator if the dev doesn't have valuators (in xtest)Peter Hutterer1-1/+1
Reported by Chris Ball.
2008-12-12Remove #define NEED_EVENTS and NEED_REPLIESPeter Hutterer1-1/+0
A grep on xorg/* revealed there's no consumer of this define. Quote Alan Coopersmith: "The consumer was in past versions of the headers now located in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h, all the event definitions were only available if NEED_EVENTS were defined, and all the reply definitions required NEED_REPLIES. Looks like Xproto.h dropped them by X11R6.3, which didn't have the #ifdef's anymore, so these are truly ancient now." Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-10-31Move EXTENSION_BASE and EXTENSION_EVENT_BASE to misc.h.Peter Hutterer1-1/+0
2008-07-24Remove all empty extension reset hooks, replace with NULL.Adam Jackson1-11/+1
2008-06-11Xext: init firstValuator to zero, otherwise core XTest events may get lost.Peter Hutterer1-1/+1
2008-05-31Xext: use GPE/GKE from XTestFakeInput #16145Peter Hutterer1-201/+109
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-29Xext: only free events in case of core motion events.Peter Hutterer1-1/+1
2008-05-23input: instead of lastx/y, use a last.valuators[] array on the device.Peter Hutterer1-4/+4
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-16Xext: fix typo in condition.Peter Hutterer1-1/+1
Fall-out from dc3aba8a559d4304844ee1cc306c577a63b82762. We must free the event if it is NOT an extension event.
2008-05-13Xext: emulate XI events from core events when faking input.Peter Hutterer1-0/+25
We need XI events for event processing, so lets get rid of the pure core events ASAP.
2008-05-13Xext: core button events have rootX/Y unset too.Peter Hutterer1-6/+3
2008-04-22Xext: route event through master if required (XTestFakeInput)Peter Hutterer1-1/+9
2008-04-22Xext: Update sprite on fake input only for MDs and floating SDs.Peter Hutterer1-4/+8
2008-04-18Xext: Let XTestFakeInput update the sprite for XI events.Peter Hutterer1-4/+30
Since XI devices can have their own sprite now, we need to update the sprite coordinates too when processing an XI event. Note: This doesn't deal with the device hierarchy correctly yet.
2008-04-18Xext: xtest.c: death to tabs+spaces indendation, remove #define XINPUTPeter Hutterer1-344/+334
2008-01-03Merge branch 'master' into mpxPeter Hutterer1-28/+16
Conflicts: XTrap/xtrapddmi.c Xext/security.c Xext/xprint.c Xext/xtest.c Xext/xvdisp.c Xi/exevents.c Xi/grabdevb.c Xi/grabdevk.c Xi/opendev.c Xi/ungrdev.c Xi/ungrdevb.c Xi/ungrdevk.c dix/cursor.c dix/devices.c dix/dixutils.c dix/events.c dix/getevents.c dix/main.c dix/window.c hw/xfree86/ramdac/xf86Cursor.c include/dix.h include/input.h include/inputstr.h mi/midispcur.c mi/miinitext.c mi/misprite.c render/animcur.c xfixes/cursor.c xkb/xkbAccessX.c
2007-11-22DeviceIntRec: move lastx/lasty from valuator into DeviceIntRec.Peter Hutterer1-2/+2
We free the ValuatorClassRec quite regularly. If a SIGIO is handled while we're swapping device classes, we can bring the server down when we try to access lastx/lasty of the master device.
2007-11-21xtest: switch an inputInfo.pointer over to PickPointer.Peter Hutterer1-11/+12
Couple of whitespace fixes too.
2007-11-21Xext: Scruffy the janitor don't like no "register" keywords.Peter Hutterer1-19/+19
2007-11-20registry: Fix some mistakes in the reversion of prior commits.Eamon Walsh1-1/+1
2007-11-20registry: Remove registry code from XTest extension.Eamon Walsh1-16/+3
Moving all the names into dix/registry.c
2007-11-19xace: restore the old SaveScreens function and introduce new API, since theEamon Walsh1-1/+1
old version is called from drivers...
2007-10-15registry: Register XTest extension protocol names.Eamon Walsh1-14/+14
2007-10-02xace: add hooks + new access codes: XTEST extensionEamon Walsh1-5/+6
2007-09-28xace: add hooks + new access codes: XKB extension.Eamon Walsh1-3/+3
Removes "LookupKeyboardDevice" and "LookupPointerDevice" in favor of inputInfo.keyboard and inputInfo.pointer, respectively; all use cases are non-XI compliant anyway.
2007-09-28xace: add new hooks + access controls: XInput extension.Eamon Walsh1-4/+4
Introduces new dix API to lookup a device, dixLookupDevice(), which replaces LookupDeviceIntRec and LookupDevice.
2007-08-16xace: add hooks + new access codes: core protocol screensaver requestsEamon Walsh1-1/+1
2007-04-26Enable event delivery for multiple heads.Paulo Ricardo Zanoni1-3/+3
Requires moving the spriteTrace into the DeviceIntRec and adjusting a few functions to take in device argument, most notably XYToWindow(). Cursor rendering on the second screen is busted.
2007-03-02dix, Xext, Xtrap, Xi: replace inputInfo.pointer with PickPointer wherePeter Hutterer1-3/+3
possible. More replacements to come.
2007-03-01dix: Remove InitSprite, work can be done by InitializeSprite.Peter Hutterer1-4/+4
Free sprite struct if a spriteOwner is paired. xfree86: Use PairDevices instead of passing booleans around when creating a sprite. Xext: Switch back to using LookupPointer/KeyboardDevice instead of inputInfo.xyz.
2007-03-01Xext: Update device's lastx/lasty when sending a motion event with XTest.Peter Hutterer1-0/+2