Age | Commit message (Collapse) | Author | Files | Lines |
|
Xephyr doesn't manually set Activate/DeactivateGrab for new devices,
resulting in a NULL-pointer dereference later when a grab is activated.
Avoid the segfault by ensuring that the pointer is always valid.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 6f9e22049862ee9ac7f604411d005d8bb1b2dd1c)
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
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>
(cherry picked from commit b680bda34da130ce408783f04214771471e41e8d)
(cherry picked from commit 04c9e80f083659e63cffec8969fb3a0cfc551a97)
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Add a proper access mode, and reverse the logic of the return value.
Zero ("Success") is returned on success from the hook calls.
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
(cherry picked from commit 3cea176d5abcb0f14eefbdcbe17fed0847524dd4)
|
|
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Note that deviceKeyButtonPointer and keyButtonPointer have the same wire
layout, so we only need to check for event types.
X.Org Bug 20557 <http://bugs.freedesktop.org/show_bug.cgi?id=20557>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
(cherry picked from commit 4f86ee61a4abf7a29e565d095aa08abd0ca9dc66)
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
(cherry picked from commit 063833f3a6d9f8f657e3de309c8d6d5c3d606513)
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
The builtin-fonts configure option was removed, as it at best should
have been a runtime option. Instead, now it always register all "font
path element" backends, and adds built-ins fonts at the end of the
default font path.
This should be a more reasonable solution, to "correct" the most
common Xorg FAQ (could not open default font 'fixed'), and also don't
break by default applications that use only the standard/historical
X Font rendering.
(cherry picked from commit 49b93df8a3002db7196aa3fc1fd8dca1c12a55d6)
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Previously, only buttons <= 5 would count here, but the core protocol
allows for 255 buttons.
http://lists.freedesktop.org/archives/xorg/2009-January/042092.html
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 717a961528ec69a6e630d536e15568670e0b398a)
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Currently, if a device map differs from the core pointer map, then the
request may return MappingBusy, even though all the affected core
buttons are in the up state.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 3d549438c29004d78032ecc50ab45ca0e3f49623)
|
|
The device's button down state array was changed to use DOWN_LENGTH and thus
bitflags for each button in cfcb3da7.
Update the DBSN events to copy this bit-wise state.
Update xkb and Xi to check for the bit flag instead of the array value.
Reported by ajax.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
(cherry picked from commit a85f0d6b98237d8a196de624207acf1983a1859a)
|
|
If the MD's lastSlave was a devices with custom axes ranges, then a
WarpPointer would position the cursor at the wrong location. A WarpPointer
request provides screen coordinates and these coordinates were scaled to the
device range before warping.
This patch consists of two parts:
1) in the WarpPointer handling, get the lastSlave and post the event through
this device.
2) assume that WarpPointer coordinates are always in screen coordinates and
scale them to device coordinates in GPE before continuing. Note that this
breaks device-coordinate based XWarpDevicePointer calls (for which the spec
isn't nailed down yet anyway) until a better solution is found.
X.Org Bug 19297 <http://bugs.freedesktop.org/show_bug.cgi?id=19297>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit d36adf52a2b2711d22b11105f7bd907d4493fb9b)
|
|
No MotionNotify events in the processing anymore, so let's have them treat DMN
instead.
Reported by Thomas Jaeger.
(cherry picked from commit 488d45295105daf10ccd17ca93ae6a6f4d0104f1)
|
|
other threads mieqEnqueue
Avoid possible race condition whereby one thread might call mieqEnqueue before InitAndStartDevices finishes
(cherry picked from commit 94e417ac87a98cd5c6bf2d7c495d702748398931)
|
|
positionSprite needs to scale to screen coordinates and in the process of
doing so alters dev->last.valuators[0:1]. Drop the real coordinates back after
finishing and before updating the motion history. This way, we don't push the
screen coordinates into the motion history.
X.Org Bug 19285 <http://bugs.freedesktop.org/show_bug.cgi?id=19285>
(cherry picked from commit 56efbc0986e782da45addb05ece9f456d41d7a90)
|
|
This was broken in 32aa252e988be8cbfd4f7e373fb7b7736ef1f5f2.
Signed-off-by: Kim Woelders <kim@woelders.dk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 30d2cfcd3851870178d62e5067211aa36f87fbd2)
Conflicts:
dix/events.c
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Rather than assuming rules in the CoreKeyboardProc, init the default rules in
InitCoreDevices, then re-use them later.
In the xfree86 DDX, set the rules to "base" or "evdev", depending on whether
we'll load kbd or evdev.
If we create a new MD, use pc105,us as default and re-use the rules file used
previously.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
This commit moves the focus handling from events.c into enterleave.c and
implements a model similar to the core enter/leave model.
For a full description of the model, see:
http://lists.freedesktop.org/archives/xorg/2008-December/041740.html
This commit also gets rid of the focusinout array in the WindowRec, ditching
it in favour of a local array that keeps the current focus window for each
device.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit eb2d7b3d700952ba88c77deacf687b251300e660)
Conflicts:
dix/events.c
include/input.h
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
SetFocusIn and SetFocusOut, including the static array to keep all focus
windows.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 673eb23aac578dcdc04e2a99d1fa5c2987eb58b8)
|
|
Instead of keeping a flag on each window for the devices that are in this
window, keep a local array that holds the current pointer window for each
device. Benefit: searching for the first descendant of a pointer is a simple
run through the array.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 38b28dcadd0990cb43f50db4300eebb8f044db96)
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 72ad4a85cc0ffe60a90011d65ef718d5852beae4)
|
|
The old model was implemented based on a misunderstanding of NotifyVirtual and
NotifyNonlinearVirtual events. It became complicated and was broken in some
places [1]. This patch wipes this model completely.
A much simplified implementation is provided instead. Rather than a top-down
approach ("we have a tree of windows, which ones need to get which event")
this one uses a step-by-step approach. For each window W between A and B
determine the pointer window P as perceived by this window and determine the
event type based on this information. This is in-line with the model described
by Owen Taylor [2].
[1] http://lists.freedesktop.org/archives/xorg/2008-December/041559.html
[2] http://lists.freedesktop.org/archives/xorg/2008-August/037606.html
(cherry picked from commit 0aa4460c3b4f9bb17d5412d76fa8c4c501132429)
Conflicts:
dix/enterleave.c
|
|
Devices are only activated once - right after they've been added to the
server. If a device failes activation, it's dead. There's no reason to
continue. Return the error code from ActivateDevice() without setting up
sprite information or even sending a event to the client.
Then - in the DDX - just remove the device again.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 27011254c4de4e573a0851bf46892fb488db6522)
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 0b4fef6337d88ae8ef05b8b73941350a9007565c)
|
|
Follow-up to 4971315296cb. countValuatorEvents was copied from GKVE where it
was obviously broken but nobody noticed. GPE had the correct version, but that
one got lost during de-duplication. Restoring the correct calculation - if we
have 6 valuators, we want 1 valuator event, not 2.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
(cherry picked from commit ee1a6c28418a6dad6c89f79a994f27bfbaa77368)
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
Restore the XI 1.x event model: VCP/VCK deliver core events only, SDs device
events only.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
|
Server 1.6 uses the X Input 1.x input model, where the core devices (VCP and
VCK) do not generate XI events. They don't have to swap device classes but
instead stay at the default number of classes at all times.
This means we can get rid of the DeviceClassesChangedEvents as well.
|
|
|
|
Updated patch, see
http://lists.freedesktop.org/archives/xorg/2008-November/040540.html
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
I merged the wrong patch. See correct patch at:
http://lists.freedesktop.org/archives/xorg/2008-November/040540.html
Not activating the device before attempting to enable it would leave the
sprite unset, crashing the server when enabling the real devices.
This reverts commit e078901a4eca02bd3e7a80d9462dafbca939a187.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
|
This prevents a protocol visible side-effect (XVisibilityEvent) on
XCompositeRedirectWindow() followed by a XCompositeUnredirectWindow().
The problem shows up in gnome-screensaver with compiz and "unredirect
fullscreen windows" enable. A VisibilityNotify event is generated (first
with obscured and than with unobscured) when the window swithces from
redirected to unredirected.
https://bugs.freedesktop.org/show_bug.cgi?id=18133
http://launchpad.net/bugs/278112
|
|
As proposed by Owen Taylor [1], the enter-leave event model needs to adjust
the events sent to each window depending on the presence of pointers in a
window, or in a subwindow.
The new model can be summarised as:
- if the pointer moves into or out of a window that has a pointer in a child
window, the events are modified to appear as if the pointer was moved out of
or into this child window.
- if the pointer moves into or out of a window that has a pointer in a parent
window, the events are modified to appear as if the pointer was moved out of
or into this parent window.
Note that this model requires CoreEnterLeaveEvent and DeviceEnterLeaveEvent to
be split and treated separately.
[1] http://lists.freedesktop.org/archives/xorg/2008-August/037606.html
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
|
FirstPointerChild: Return the first child that has a pointer within its
boundaries.
FirstPointerAncestor: return the first ancestor with a child within its
boundaries.
These are required for the updated enter/leave model.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
|
These replace the ENTER_LEAVE_SEMAPHORE_* macros. Unused currently.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
|
Device events always need to be delivered, core events only in some cases.
Let's keep them completely separate so we can adjust core event delivery.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
|
Preparation for the new core enter/leave model.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
VCP and VCK are always present, this comment is a leftover from earlier MPX
days.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
|
Signed-off-by: James Cloos <cloos@jhcloos.com>
|
|
We need them for each window, every time a window is allocated. Storing them
in a devPrivate is the wrong thing to do.
This also removes the unused ENTER_LEAVE_SEMAPHORE_ISSET macro.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
|
|
|
grab == devgrab anyway, this is a leftover from the time when we had two
different grabs per device (core and XI grab).
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
|
|
|
|
Remove several doubled statement-terminal semicolons.
Reported by Fernando Carrijo.
|
|
Really, this was a bad idea. It's not security, the UI features that would
have been cool (e.g. clicking through windows) aren't implemented anyway, and
there's nothing you can't achieve just by using plain XI anyway.
Requires inputproto 1.9.99.6.
|