summaryrefslogtreecommitdiff
path: root/dix
AgeCommit message (Collapse)AuthorFilesLines
2011-07-09input: add POINTER_NORAW to avoid generation of raw events (#30068)Peter Hutterer1-7/+11
RawEvents are supposed to be events coming from the driver. When warping the pointer, this should not generate a raw event. X.Org Bug 30068 <http://bugs.freedesktop.org/show_bug.cgi?id=30068> 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> (cherry picked from commit 23a783278963919778d017965542e0f983814e37) Conflicts: dix/getevents.c
2011-06-20input: Only release SD buttons for explicit floating/reattachment (#36146)Peter Hutterer1-3/+1
Grabbing an SD device temporary floats the device but we must not release the buttons. Introduced in commit 9d23459415b84606ee4f38bb2d19054c432c8552 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 25 11:08:19 2011 +1000 dix: release all buttons and keys before reattaching a device (#34182) X.Org Bug 36146 <http://bugs.freedesktop.org/show_bug.cgi?id=36146> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> (cherry picked from commit bf2059b07a97e5e579c13c2c9d49707093427dc2) Conflicts: dix/devices.c
2011-06-20dix: release all buttons and keys before reattaching a device (#34182)Peter Hutterer1-0/+42
Testcase: xinput float <keyboard name> results in the keyboard's enter key being repeated as the device is detached while the key is still physically down. To avoid this, release all keys and buttons before reattaching the device. X.Org Bug 34182 <http://bugs.freedesktop.org/show_bug.cgi?id=34182> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> (cherry picked from commit 9d23459415b84606ee4f38bb2d19054c432c8552) (cherry picked from commit 81fbb96c54f78a7cd96433294ee003c7ef6a772a)
2011-06-11dix: fix an error message.Peter Hutterer1-1/+1
event type, not device type. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit f94898928dfaf8df648bc3eea7d304826b7ac1b8) Conflicts: dix/events.c
2011-06-01DIX: Set backgroundState correctly for root windowMarko Macek1-0/+2
When we change the root window's background to None, and we've run with -wr or -br for a forced solid background, make sure we also change the background state to BackgroundPixel, so we don't try to lookup either pScreen->whitePixel or pScreen->blackPixel as a pixmap. Signed-off-by: Marko Macek <Marko.Macek@gmx.net> Reviewed-by: Walter Harms <wharms@bfs.de> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit c5b72fd350bbdfd1facd0ddd5085f238c4cf252a)
2011-05-16XQuartz: Don't call mieqEnqueue during server shutdownJeremy Huddleston1-9/+16
Found-by: GuardMalloc Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> (cherry picked from commit 25191648b8db87735a99243697f73036255c1eb6)
2011-05-04dix: fix typo in direction calculationPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> (cherry picked from commit 8c528c667da7c7fba0ba07973a06b2d4613fbf70)
2011-05-04Xi: fix valuator alignment in DeepCopyDeviceClasses (#36119)Peter Hutterer1-10/+37
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> (cherry picked from commit 419a27b5219a739f2fbd50cc96a1b54c469e4a88)
2011-04-14Revert "dix: release all buttons and keys before reattaching a device (#34182)"Jeremy Huddleston1-42/+0
This patch introduced a regression, reverting for the 1.10.1 release. See https://bugs.freedesktop.org/show_bug.cgi?id=36146 This reverts commit 81fbb96c54f78a7cd96433294ee003c7ef6a772a.
2011-04-08Fix unset valuator handling for XI 1.x valuator events againChase Douglas2-9/+9
Set the valuator values for unset masked absolute valuators in the internal device event. This ensures the values will always be correct in getValuatorEvents even if the device has been removed. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit b28a1af55cf1ad2a882cc8cd73b77341dec7ff5a)
2011-04-08Don't report old relative values in getValuatorEventsChase Douglas1-1/+3
Relative valuator values should not be reported in any future events. If a relative valuator value is not set in an internal event, set the value to 0 for XI 1.x valuator events sent over the wire. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-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> (cherry picked from commit f40103cee1d591387359f401a5a7c21f4105aeb4)
2011-04-08Handle non continuous valuator data in getValuatorEventsChase Douglas1-4/+7
This allows for masked valuators to be handled properly in XI 1.x events. Any unset valuators in the device event are set to the last known value when transmitted on the wire through XI 1.x valuator events. Fixes https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/736500 Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 8199eac443d2c22d313cb23e39d5e607a8cc7f99)
2011-04-08Clean up getValuatorEvents using array loop logicChase Douglas1-14/+6
Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit ac00ab77d5a00cfd198958aa1afaa4c3ccc6d7bc)
2011-04-07Input: Don't freeze unrelated devices in DeliverGrabbedEventDaniel Stone1-4/+3
When delivering an event to a device grabbed with SyncBoth, DeliverGrabbedEvent walks the device tree looking for associated devices to freeze them. Unfortunately, it froze all devices instead of just the paired device, and the previous fix in 4fbadc8b17237f3c would still break if the same client had a non-SyncBoth grab on another unrelated master device. Fix this by completely ignoring devices that aren't our paired device. 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> (cherry picked from commit b636893137da1695e235e3a9354bfd9243fdddc2)
2011-04-07dix: release all buttons and keys before reattaching a device (#34182)Peter Hutterer1-0/+42
Testcase: xinput float <keyboard name> results in the keyboard's enter key being repeated as the device is detached while the key is still physically down. To avoid this, release all keys and buttons before reattaching the device. X.Org Bug 34182 <http://bugs.freedesktop.org/show_bug.cgi?id=34182> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> (cherry picked from commit 9d23459415b84606ee4f38bb2d19054c432c8552)
2011-04-04dix: fix memory leak in ProcListExtensionsTiago Vignatti1-3/+2
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>
2011-04-04dix: fix memory leak in AllocSharedTiago Vignatti1-0/+1
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>
2011-04-04dix: fix memory leak in AllocPseudoTiago Vignatti1-0/+1
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>
2011-04-04dix: fix memory leak in SetDefaultFontPathTiago Vignatti1-1/+3
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>
2011-04-04dix: remove unused macroTiago Vignatti1-2/+0
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>
2011-04-04dix: remove unused debug codeTiago Vignatti1-12/+0
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-27dix: Release input device config info when the device disconnects.Rami Ylimäki1-0/+2
Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 8d30aff4aa708b9b885d492602ced7493a96a4df)
2011-02-25input: Ensure Valuator axes are aligned as neededKeith Packard1-6/+8
Let the compiler figure out the correct alignment for the axes data for a valuator by using a union to force double alignment of the initial ValuatorClassRec structure in the allocation. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-02-22dix: a valuator number of 0 is valid (#34510)Peter Hutterer1-2/+14
For all but motion and proximity events, having no valuators is ok. Regression from 1.9, keyboard events are not converted to protocol events. X.Org Bug 34510 <http://bugs.freedesktop.org/show_bug.cgi?id=34510> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Tested-by: Timo Aaltonen <timo.aaltonen@canonical.com>
2011-01-20Merge remote branch 'ajax/for-keithp'Keith Packard1-25/+17
2011-01-20resource: Fix indentationAdam Jackson1-14/+14
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-01-20resource: Remove expectID hackAdam Jackson1-7/+0
This is clearly meant to short-circuit the (modestly) expensive resource lookup in LegalNewID. The problem is that long-lived clients will eventually run completely through their XID space and start asking XC-MISC for IDs to reuse. Once that happens, the comparison against expectID will always be true, and we'll no longer catch XID collisions at all. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-01-20resource: s/NullResource/NULL/gAdam Jackson1-4/+3
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-01-07Merge branch 'for-peter' of git://people.freedesktop.org/~daniels/xserver ↵Peter Hutterer1-62/+56
into for-keith
2011-01-07input: add valuator_mask_free() to free a valuator mask.Peter Hutterer1-0/+8
Expecting the caller to free the mask requires us to keep it in a single memory block (which may be an issue lateron), aside from leaving the API asymetrical. Provide valuator_mask_free() to free the memory and reset the mask pointer to NULL. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-01-07Input: Prevent MD grabs from wandering on to other MDsDaniel Stone1-1/+1
The code to set sync.other in DeliverGrabbedEvents is supposed to reset sync.other for a paired MD to the grab under consideration, but was rather optimistic in resetting sync.other for _all_ devices. This would fall apart given two sets of MDs (A paired with B, Y paired with Z), where both MDs were in FREEZE_BOTH_NEXT_EVENT due to being called with SyncBoth, where no event had yet triggered the grab. An event being processed on MD A would result in B, Y and Z all having sync.other set to A's grab, rather than just B. 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>
2011-01-06Input: Make CheckPassiveGrabsOnWindow return grab, exportDaniel Stone1-15/+15
Change CheckPassiveGrabsOnWindow to return the GrabPtr it used (or NULL if none) rather than a boolean, and export it. Also add an additional boolean 'activate' parameter; use TRUE for existing behaviour, or FALSE to only find the grab and then return it. This will be used in forthcoming touch patches to find the grabs, rather than open-coding same. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-01-06Input: Export GetEventMaskDaniel Stone1-1/+1
Make it non-static, add to headers. 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>
2011-01-06Input: Handle grabs with no Xi 1.x equivalentDaniel Stone1-2/+2
Don't try to search for an Xi 1.x grab in CheckPassiveGrabsOnWindow for events with no Xi 1.x equivalent. 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>
2011-01-06Input: Pass sprite instead of device to XYToWindow, make non-staticDaniel Stone1-13/+6
XYToWindow calculates the position of the cursor and updates the sprite trace, but does nothing else with the device. Pass a SpritePtr instead so we can update an alternate focus instead of hardcoding the device's sprite. Also make this function non-static, so we can use it elsewhere. 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>
2011-01-06Input: Pass sprite instead of device to FixUpEventFromWindowDaniel Stone1-22/+21
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>
2011-01-06Input: Make RootWindow() take a sprite instead of deviceDaniel Stone1-12/+14
GetCurrentRootWindow already works for the device case, although not as an lvalue. 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>
2011-01-05composite: Support updating an arbitrary subtreeVille Syrjälä1-0/+4
Rename compUpdateWindow to compPaintWindowToParent and split the child walk to compPaintChildrenToWindow. Calling compPaintChildrenToWindow allows an arbitrary subtree to be updated, instead of having to update all the windows. This will be used to make sure all the descendants are copied to the parent when the parent window contents need to be accessed in IncludeInferios sub-window mode. WindowRec has a new member 'damagedDescendants' that is used to keep track of which subtrees need updating. When a window is damaged, 'damagedDescendants' will be set for all the ancestors, and when a subtree is updated, the tree walk can be stopped early if no damaged descendants are present. CompScreenRec no longer needs the 'damaged' member since the root window's 'damagedDescendants' provides the same information. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-31DIX: Reset window properties when freeing themDaniel Stone1-0/+3
This enables us to reliably inspect properties when destroying windows. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
2010-12-31Make EventIsDeliverable non-staticChase Douglas1-12/+1
Will be used outside dix/events.c in proceeding XI 2.1 MT changes. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-12-31Resources: Move rClient to resource.hDaniel Stone1-2/+0
The definition of rClient was duplicated across three source files, so move it to resource.h. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-12-20fonts: Fix typo in async ListFonts logicAdam Jackson1-1/+1
This was introduced in 3ab6cd31cbdf8095b2948034fce5fb645422d8da. Mea culpa. This logic is still incorrect [1], but at least it's less incorrect. [1] - https://bugzilla.redhat.com/658587 Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-12-10dix: allow for button-only input devices (#21457)Peter Hutterer1-15/+21
Add a few checks for the existence of a valuator class on the device to avoid null-pointer dereferences for button events from devices without a valuator class. X.Org Bug 21457 <http://bugs.freedesktop.org/show_bug.cgi?id=21457> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-09dix: clear up an overly convoluted if statement.Peter Hutterer1-9/+17
No functional changes, just improves readability. This statement had things added to/removed from it for a few server releases while the input event queue was revamped. What made sense once is now mainly confusing. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-12-07Merge remote branch 'alanc/master'Keith Packard7-12/+19
2010-12-07Replace alloc+strcpy+strcat with asprintf() & XNFasprintf() callsAlan Coopersmith1-6/+11
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07Convert existing Xprintf style calls to asprintf styleAlan Coopersmith1-1/+3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07Sun's copyrights now belong to OracleAlan Coopersmith5-5/+5
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07dix: Fix logic for displaying deprecation warning only once.Cyril Brulebois1-5/+5
As pointed out by Jamey Sharp (again), the logic is faulty: --warn is always going to be false. Replace it with warn-- accordingly, so that there's (at least, but also only) one warning showing up. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-07dix: Simplify deprecated *Lookup* wrappers around dixLookup*.Cyril Brulebois1-10/+10
As pointed out by Jamey Sharp: “the result pointer is already guaranteed to be NULL if the return value is not Success”, so get rid of the variable used to catch the return value, and used in a ternary operation to decide whether to return the pointer or NULL. Always return the result pointer instead. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Cyril Brulebois <kibi@debian.org>