Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
XTest devices are non-optional but nonetheless specific to the XTEST
extension.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
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.
|
|
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>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
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).
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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.
|
|
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>
|
|
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>
|
|
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Reported by Chris Ball.
|
|
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>
|
|
|
|
|
|
|
|
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>
|
|
|
|
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.
|
|
Fall-out from dc3aba8a559d4304844ee1cc306c577a63b82762.
We must free the event if it is NOT an extension event.
|
|
We need XI events for event processing, so lets get rid of the pure core
events ASAP.
|
|
|
|
|
|
|
|
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.
|
|
|
|
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
|
|
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.
|
|
Couple of whitespace fixes too.
|
|
|
|
|
|
Moving all the names into dix/registry.c
|
|
old version is called from drivers...
|
|
|
|
|
|
Removes "LookupKeyboardDevice" and "LookupPointerDevice" in favor of
inputInfo.keyboard and inputInfo.pointer, respectively; all use cases
are non-XI compliant anyway.
|
|
Introduces new dix API to lookup a device, dixLookupDevice(), which
replaces LookupDeviceIntRec and LookupDevice.
|
|
|
|
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.
|
|
possible. More replacements to come.
|
|
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.
|
|
|