Age | Commit message (Collapse) | Author | Files | Lines |
|
Remove duplicated includes.
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
|
|
Reported-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
Conditional jump or move depends on uninitialised value(s)
at 0x4357A1: GetEventMask (events.c:454)
by 0x43B9E8: DeliverEventsToWindow (events.c:2029)
by 0x4E0C59: SendEventToAllWindows (exevents.c:2125)
by 0x4E8301: XISendDeviceHierarchyEvent (xichangehierarchy.c:118)
by 0x426F99: DisableDevice (devices.c:507)
by 0x46BF72: xf86Wakeup (xf86Events.c:457)
by 0x432ABA: WakeupHandler (dixutils.c:419)
by 0x45B708: WaitForSomething (WaitFor.c:235)
by 0x42E8D9: Dispatch (dispatch.c:367)
by 0x422DC9: main (main.c:287)
Uninitialised value was created by a stack allocation
at 0x4E8190: XISendDeviceHierarchyEvent (xichangehierarchy.c:61)
Conditional jump or move depends on uninitialised value(s)
at 0x43BB78: DeliverEventsToWindow (events.c:2010)
by 0x4DDEEA: FindInterestedChildren (exevents.c:2103)
by 0x4DDEFF: FindInterestedChildren (exevents.c:2104)
by 0x4DDEFF: FindInterestedChildren (exevents.c:2104)
by 0x4DDEFF: FindInterestedChildren (exevents.c:2104)
by 0x4DDEFF: FindInterestedChildren (exevents.c:2104)
by 0x4E0C6F: SendEventToAllWindows (exevents.c:2127)
by 0x4E8301: XISendDeviceHierarchyEvent (xichangehierarchy.c:118)
by 0x426F99: DisableDevice (devices.c:507)
by 0x46BF72: xf86Wakeup (xf86Events.c:457)
by 0x432ABA: WakeupHandler (dixutils.c:419)
by 0x45B708: WaitForSomething (WaitFor.c:235)
Uninitialised value was created by a stack allocation
at 0x4E8190: XISendDeviceHierarchyEvent (xichangehierarchy.c:61)
Set the type of dummyDev to SLAVE. The jump listed above comes from a check
to IsMaster() in GetEventMask() that would then set the
XIAllMasterDevices mask.
Hierarchy events can only be set for XIAllDevices so the above IsMaster()
check had no effect and the device type doesn't really matter anyway beyond
shuting up valgrind.
Also initialize dummyDev to 0 to ease future debugging.
X.Org Bug 36120 <http://bugs.freedesktop.org/show_bug.cgi?id=36120>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
commit 678f5396c91b3d0c7572ed579b0a4fb62b2b4655 only fixed the
initialization, not the copy. After a slave device change, the valuator
were out of alignment again.
X.Org Bug 36119 <http://bugs.freedesktop.org/show_bug.cgi?id=36119>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
|
|
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
|
|
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
WriteReplyToClient() swaps rep.length, so it can't be used
on return of WriteReplyToClient(). So save it's value for later
use.
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
|
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
|
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
|
This removes the struct, but keeps InitAbsoluteClassDeviceStruct as
a no-op and preserves related struct layout.
Signed-off-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
If modifiers failed, the reply length was 4 bytes too short.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
ChangeDeviceProperty and XIChangeProperty are followed by some data, so
use REQUEST_AT_LEAST_SIZE instead of REQUEST_SIZE_MATCH.
X.Org bug#35082 <https://bugs.freedesktop.org/show_bug.cgi?id=35082>
Reported-by: Markus Fleschutz <markus.fleschutz@x-software.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
No functional change
Reviewed-by: Soren Sandmann <ssp@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
|
|
This is not a straightforward search/replacement due to a long-standing
issue.
dev->u.master is the same field as dev->u.lastSlave. Thus, if dev is a master
device, a check for dev->u.master may give us false positives and false
negatives.
The switch to IsFloating() spells out these cases and modifies the
conditions accordingly to cover both cases.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
|
|
These two were sideeffects of lastSlave being in the same field as the
master. For devices generated by the master device directly, lastSlave was 0
and the device would (with the old checks) be interpreted as floating.
Add the required checks to safeguard against master devices.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
|
|
When system is out of memory, calloc can fail returning a NULL pointer.
Check for this before dereferencing it, and bail out if it fails.
Ref.: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/720445
Signed-off-by: Bryce Harrington <bryce@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
When a client has selected for Xi 1.x DeviceStateNotify events, they
should receive them when a DeviceFocusIn event is generated. The code
to do this was there, but an incorrect test meant they were never being
sent.
The "type" passed in is the XI2 type, the XI1 type is in event.type.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
CheckDeviceGrabs will activate a passive grab for KeyPress and
ButtonPress events. GrabInfoRec::activatingKey contains the keycode
which activated the passive grab, so we can deactivate it later in
ProcessOtherEvents.
Previously, CheckDeviceGrabs relied on its callers to set
activatingKey, which not all callers were doing (I'm looking at you,
ComputeFreezes). Just set it in CheckDeviceGrabs instead.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The previous XKB info was being returned instead of the current
one, producing inconsistent results between the latest events
and the modifiers/group returned by this call.
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>`
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
We don't modify "value", make it official.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Simon Thum <simon.thum@gmx.de>
|
|
Since FixUpEventFromWindow only uses the sprite trace to determine the
window stack, pass in a sprite instead of hardcoding the device sprite,
so we can deliver to windows other than the one currently containing the
sprite.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Swap flags for different-endian clients when delivering XI2
DeviceEvents.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
When we send BadValue back to the client for having invalid mask bits,
at least tell them what the (first) invalid bit was.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
It is currently assumed that an event button delieved to a master device
corresponds to the slave button states. However, the event button is a
logical (mapped) slave button and slave button states correspond to
physical (unmapped) slave buttons. This leads to incorrect update of the
master button state and incorrect events devlivered to clients. Fix the
situation by taking the slave button map into account when querying a
slave button state.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24887
Signed-off-by: Eoghan Sherry <ejsherry@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
If any part of the stack calls XIGetKnownProperty during device shutdown
the property is re-initialized before the server generation resets, leaving
the value invalid again.
Move the reset to the extension init which happens before input devices are
initialized before the first property is requested.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
|
input-api
Conflicts:
dix/getevents.c
hw/xfree86/common/xf86Xinput.h
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
When getting close to the MAXDEVICES limit, the creation of XTEST devices
may fail due to device id exhaustion. In that case, fail the creation of
master devices too and return an error to the client.
Theoretically, we could alloc the MDs without the XTEST devices but that
will get interesting when a client starts sending XTEST events through those
devices.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
|
They were named ptr when everything was in one function to save one more
variable. Now that the stuff is split out, "dev" makes more sense.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
|
No functional changes, just code cleanup to improve readability.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
|
From the original bug reporter Ezra Reeves:
"I did some more digging on this today, and I found that an HP branded
wireless USB mouse has the same issue. With this mouse (as well as the
logitech wireless mouse), the return from:
xdev = XListInputDevices(GDK_WINDOW_XDISPLAY(rootwin), &ndevices_return);
lists the USB device twice, but both have xdev[num].use == 3
(IsXExtensionKeyboard as defined in X11/XI.h).
[...]
Swapping the order of the test in Xi/listdev.c that determines whether a
device is a pointer or a keyboard properly detects my devices (OEM USB
wireless mouse/kb combo) -- one as a keyboard and one as a pointer."
X.Org Bug 29046 <http://bugs.freedesktop.org/show_bug.cgi?id=29046>
Reported-by: Erik Kilfoil <ekilfoil@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
We have per-axis mode now. For those bits that still need it (XI 1.x),
assume that the first axis holds the device's mode.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Previously the OutOfProximity bit in the valuator mode.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
The XI2 protocol supports per-axis modes, but the server so far does
not. This change adds support in the server.
A complication is the fact that XI1 does not support per-axis modes.
The solution provided here is to set a per-device mode that defines the
mode of at least the first two valuators (X and Y). Note that initializing
the first two axes to a different mode than the device mode will fail.
For XI1 events, any axes following the first two that have the same mode
will be sent to clients, up to the first axis that has a different mode.
Thus, if a device has relative, then absolute, then relative mode axes,
only the first block of relative axes will be sent over XI1.
Since the XI2 protocol supports per-axis modes, all axes are sent to the
client.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Conflicts:
config/udev.c
hw/xfree86/common/xf86Helper.c
hw/xfree86/common/xf86Module.h
hw/xfree86/common/xf86Xinput.h
hw/xfree86/os-support/linux/lnx_init.c
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
This hook wasn't used by any DDX. Device addition and removal is handled by
the config backend, so we don't need to do anything special that during the
ListInputDevices request processing.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
In theory, these hooks were to be used for DDX-specific device enablement.
None of the DDXs however did anything here. Now we call DEVICE_INIT on all
devices when they are added, so the xfree86 DDX as the only one with real
code didn't do anything here.
kdrive checked for device validity but that's already handled in
ProcXOpenDevice.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
RegisterPointerDevice() and RegisterKeyboardDevice() were already mapped to
RegisterOtherDevice() and obsolete.
RegisterOtherDevice() was called for all devices and the two assignments can
simply be moved into AddInputDevice(). Purge RegisterOtherDevice() and
pretend it never happened.
*lalalalala*
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|