Age | Commit message (Collapse) | Author | Files | Lines |
|
If the counter had a value higher than the trigger value for a negative
transition, the trigger value did not get set.
The correct sequence of checks is:
if (positive transition)
if (counter value < trigger value)
set up trigger
if (negative transition)
if (counter value > trigger value)
set up trigger
Red Hat Bug 501601 <https://bugzilla.redhat.com/show_bug.cgi?id=501601>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Introduced with 57aff88c7d0761e590806d07bee1c9410680c89f.
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>
|
|
Reported-by: Byeong-ryeol Kim
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.
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
gives bogus data on sparc and probably others leading to a crash.
Fix:
Don't use initializers, instead set each member directly to enforce order.
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
|
|
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>
|
|
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
|
|
Refects the ability of clients to add/remove devices and device properties.
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
|
|
Take the mapping of DixAccess bits to Flask permissions, move it
into the header file, break up the extremely long lines, and
annotate the permission names with the bit being referenced.
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
|
|
Conflicts:
Xext/geext.c
Xi/chdevcur.c
Xi/extgrbdev.c
Xi/xiproperty.c
configure.ac
dix/ptrveloc.c
hw/xfree86/common/xf86Config.c
mi/mipointer.h
test/input.c
xkb/xkb.c
|
|
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).
|
|
Instead, clients should keep track of the selection instances they use.
|
|
Error: Write outside array bounds at Xext/geext.c:406
in function 'GEWindowSetMask' [Symbolic analysis]
In array dereference of cli->nextSib[extension] with index 'extension'
Array size is 128 elements (of 4 bytes each), index <= 128
Error: Buffer overflow at dix/events.c:592
in function 'SetMaskForEvent' [Symbolic analysis]
In array dereference of filters[deviceid] with index 'deviceid'
Array size is 20 elements (of 512 bytes each), index >= 0 and index <= 20
Error: Read buffer overflow at hw/xfree86/loader/loader.c:226
in function 'LoaderOpen' [Symbolic analysis]
In array dereference of refCount[new_handle] with index 'new_handle'
Array size is 256 elements (of 4 bytes each), index >= 1 and index <= 256
These bugs were found using the Parfait source code analysis tool.
For more information see http://research.sun.com/projects/parfait
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
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>
|
|
Callsites updated to use dixLookupResourceBy{Type,Class}.
TODO: Audit access modes to make sure they reflect the usage.
|
|
Conflicts:
Xi/chdevhier.c
include/input.h
|
|
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>
|
|
|
|
This allows untrusted clients to destroy their own windows when they
have been reparented by a trusted window manager.
|
|
|
|
Previously, three extensions were defined as "trusted" by the extension:
BIG-REQUESTS, XC-MISC, and XPrint. No other extensions were permitted
to be used by untrusted clients.
In commit 8b5d21cc1d1f4e9d20e5d5eca44cb1e60a419763 this was changed for
some reason. Return to the old, compatible behavior.
|
|
|
|
|
|
|
|
|
|
The drivers might not need them but extmod does. Should move it to
builtin though.
|
|
|
|
|
|
|
|
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>
|
|
|
|
The masks were originally designed to generically handle event masks for
extensions. Since all that is in-server anyway, it's much better writing
custom event masks for those extensions that need it and not providing a
unified mechanism.
XI2 needs more than the current implementation, which is already too complex
for most other extensions. good riddance.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Requires libselinux 2.0.79 or newer. Without this, libselinux will
check for policy updates on the netlink socket on basically every policy
lookup. Statistically speaking, they never happen, and the check
translates to at least one more syscall on basically every operation.
Instead, take control of the fd from the library, and check it in
WakeupHandler if it polls readable.
|
|
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.
|
|
|
|
X server should never see, translate, or deal with a munged context.
Display managers which show contexts to the user should take care of
translating these to human readable form.
|
|
Makes window destroy about 40x faster in Xvfb.
|
|
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>
|
|
Proto headers updating resulting in the server advertising new versions is
broken. This should be applied to every extension.
This fixes the build against slightly-older xineramaproto.
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
userspace being pulled in causing issues
Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Daniel Stone <daniel@fooishbar.org>
|