summaryrefslogtreecommitdiff
path: root/dix
AgeCommit message (Collapse)AuthorFilesLines
2009-09-08Merge branch 'upstream' (one day I will rebase rather than merge)HEADmasterJoel Bosveld21-617/+912
Conflicts: test/Makefile.am
2009-09-07dix: remove dixLookupResource - we don't have any users left.Peter Hutterer1-18/+0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Acked-by: Aaron Plattner <aplattner@nvidia.com>
2009-09-04dix: hide the sequenceNumber key repeat hack behind two functions.Peter Hutterer2-7/+37
Just in case we figure out a better way to do it in the future. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-04input: allow for detectable autorepeat.Daniel Stone2-6/+54
For core and XI1 events, store the key_repeat flag in the sequence number until TryClientEvents. The sequenceNumber is unset until TryClientEvents. [Also thrown in, some random indentation changes. Thanks] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-04dix: improve code flow in TryClientEvents, better debugging messages.Daniel Stone1-52/+66
Instead of a massive if (blah && blah), return early where possible. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-03dix: don't return BadMatch from GetProperty (#23562)Peter Hutterer1-1/+1
dixLookupWindow may return BadMatch if the window in question isn't actually a window. In this case, GetProperty needs to return BadWindow - not BadMatch. X.Org Bug 23562 <http://bugs.freedesktop.org/show_bug.cgi?id=23562> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-03dix: when unsetting a cursor, update the sprite immediately (#23608)Peter Hutterer1-1/+2
Removing the device cursor while the cursor was within the window did not update the visible sprite until the next enter/leave event. X.Org Bug 23608 <http://bugs.freedesktop.org/show_bug.cgi?id=23608> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-03Un-export ApplyPointerMapping. This is an in-server function.Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-02Correct outdated e-mail address in "Author" statements.Eamon Walsh1-1/+1
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-08-28Add DRI2 requests to protocol.txtEamon Walsh1-0/+8
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-08-27Xext: rename Xtst* to XTest*Peter Hutterer1-1/+1
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>
2009-08-27input: move XTest device initialization into Xext/xtest.cPeter Hutterer1-132/+1
XTest devices are non-optional but nonetheless specific to the XTEST extension. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-27dix: use IsXtstDevice instead of the direct key lookup.Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-25CheckWindowOptionalNeed: Ensure w->optional is set to avoid SEGFAULTJeremy Huddleston1-1/+1
If CheckWindowOptionalNeed is called consecutively (and the first removes optional), then we will SEGFAULT. This can happen in XQuartz because ReparentWindow will call pScreen->ReparentWindow which can DeleteProperty which will CheckWindowOptionalNeed... then ReparentWindow will call it again later indiscriminantly. (cherry picked from commit b608c864ccc59628bd33c033393121b61580460e)
2009-08-25Ensure that rotation updates happen frequentlyKeith Packard1-1/+21
The smart scheduler is designed to minimize scheduler overhead by increasing the interval between WaitForSomething calls when a single client is running. However, the software rotation code depends on its BlockHandler being invoked for screen updates; the long delays caused by the smart scheduler optimizations means that screen updates can be delayed a long time as well. The change is simple -- prevent the smart scheduler from increasing the scheduling interval while any screen is using software rotation. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-08-24input: move CorePointer/KeyboardProc declarations into header.Peter Hutterer1-3/+0
The extern declaration in xichangehierarchy.c was broken anyway. This fixes a crash on creating a new master device. Reported-by: Maxim Levitsky Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-24dix: FixUpEventFromWindow mustn't scramble non-device events.Peter Hutterer1-1/+4
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-18Do not reset lastDeviceEventTime when we do dixSaveScreensRichard Hughes1-2/+0
When we turn off DPMS with DPMSModeOff and do dixSaveScreens, don't reset the event time else session clients using IDLETIME will be reset. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-17xace: fix access mode in dixLookupWindow call within ProcUngrabKey.Eamon Walsh1-1/+1
Referencing a window (as grab-window) only requires GetAttr access. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-08-17Add XI2 requests to protocol.txtEamon Walsh1-0/+22
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-08-17dix: rework DeviceChangedEvents a bit.Peter Hutterer2-12/+8
DCEs are now processed when sent throught the master device, not when sent through the slave device. This includes a removal of some un-used (or partly used) fields in the DCE itself to something more self-explanatory. TODO: if a device has events queued and its attachment is changed, the DCE is silently dropped now. Instead, it should be generated as soon as the first event after the attachment is sent. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-17dix: fix potential use of unused variable 'mask'.Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-17dix: use the XI2 defines for class types.Peter Hutterer1-3/+3
Doesn't matter really, they have the same values anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-17input: move DeviceChangedEvent conversion into eventconvert.cPeter Hutterer1-24/+121
The version in eventconvert.c was half broken and for some reason we ended up with a second version in exevents.c (which works). Move it over to where it belongs and call EventToXI2 instad of having a custom function for it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-15composite: ensure that cursor is correctly confined to transformed windowsJoel Bosveld1-3/+75
2009-08-14dix: update the sprite trace for all masters && floating slaves (#23257)Peter Hutterer1-1/+1
When the windows are restructured, CheckMotion needs to be called for all masters and floating slaves to update the spriteTrace. X.Org Bug 23257 <http://bugs.freedesktop.org/show_bug.cgi?id=23257> Tested-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-13dix: re-name internal eventToClassesChanged to eventToDeviceChangedPeter Hutterer1-3/+3
DeviceClassesChangedEvents (where this name comes from) have been replaced with DeviceChangedEvents. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-13test: add XI2 eventconversion test for raw events.Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-11Disable the out-of-bounds workaround in pixman.Soren Sandmann Pedersen1-0/+3
This workaround was necessary for older X servers, but now fb should be using correct coordinates. Also bump pixman requirement to 0.15.20.
2009-08-06dix: detach SD during XI2 grabs only.Peter Hutterer1-4/+7
XI1 grabs on slave devices leave the device attached - just like in earlier versions of XI. Tested-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-06Revert "dix: Remove temporary detachment of slave devices."Peter Hutterer1-0/+66
This reverts commit 0c0ef42292f4c910c73b308cd75d77637312da53. Tested-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-05Correct modifier map built when ProcSetModifierMapping is calledAlan Coopersmith1-4/+2
Fixes xmodmap changes to modifiers to stop corrupting modifier maps Previous code had two bugs: - the code to increment mod was after the code to continue if no modifier was set, so mod wouldn't be incremented for modifiers with no keys mapped to them (such as if you called xmodmap -e 'clear Lock') - the value it set in the modifier map was the raw modifier number, not the bitmask value for that modifier Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-05dix: require PointerProc and KeyboardProc to be passed into AllocDevicePair.Peter Hutterer1-7/+14
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-03dix: call SetFocusOut and LeaveWindow when disabling a device.Peter Hutterer3-1/+4
PointerWindows[x] would be set after removing a master pointer. Destroying this window then crashed the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-03dix: SetFocusOut and LeaveWindow don't need parameters other than dev.Peter Hutterer2-6/+5
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-30dix: pass the sourceid around for enter/leave events.Peter Hutterer3-23/+34
The sourceid for enter/leave events as a result of pointer motion is the ID of the slave device. The sourceid for those as a result of a grab activating is the device itself. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-30dix: remove obsolete comment, parameter described doesn't exist.Peter Hutterer1-2/+0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-30input: switch internal event types to enums.Peter Hutterer1-1/+10
Use enum EventType instead of ints. This requires a load of default cases in various switch statements to silence compiler warnings. Reported-by: Aaron Plattner Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-30xkb: move XkbFilterEvents to xkbsrv.hPeter Hutterer1-3/+0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-30dix: update GetMaximumEventsNum() to real value (3).Peter Hutterer1-7/+5
GPE and friends now use internal events so they may generate up to 3 events. One (optional) DeviceChanged event and one raw event plus a device event. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-30include: untangle events.h from the SDK headers.Peter Hutterer4-2/+4
InternalEvents shouldn't be used anywhere outside the X server itself. Split up into events.h for opaque typedefs for the events needed by various headers and eventstr.h for the actual struct definitions. eventstr.h must only be included by code that requires internal events and is not part of the SDK. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-22Bug #22804: Reject out of bounds XGetImage requestsAaron Plattner1-23/+49
The XGetImage man page states: If the drawable is a window, the window must be viewable, and it must be the case that if there were no inferiors or overlapping windows, the specified rectangle of the window would be fully visible on the screen and wholly contained within the outside edges of the window, or a BadMatch error results. Note that the borders of the window can be included and read with this request. However, the server was only checking the requested region against the screen bounds, allowing XGetImage requests to read pixels outside the bounds of a window's ancestors. Normally, this would just read other pixels from the screen, but if one of the ancestor windows is redirected, the window's backing pixmap may be smaller than the window itself. This change checks the region against the window's bounding drawable, which is either the screen pixmap, a redirected window's backing pixmap, or the root window for servers that don't support GetWindowPixmap. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2009-07-22dix: fix null-pointer dereference on activating enter/focus grabs.Peter Hutterer1-1/+10
EventToXI2 returns a NULL event for enter/focus events since these events aren't yet wrapped into internal events. This is a quickfix only, it works thanks to the alignment of internal and XI2 event types. Eventually, enter/leave events should be wrapped into internal events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-22dix: use the event mask of the grab for TryClientEvents.Peter Hutterer1-2/+5
A client that grabs for button/key events may not have the ButtonPress/KeyPress mask set and should not receive an event in that case. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-22Check if new space was actually allocated before freeing.Pierre Willenbrock1-3/+8
There will be no new space allocated, if mode != PropModeReplace and len == 0, or if mode is not one of the handled modes. This fixes freeing data that is still in use, leading to double frees and other memory corruption. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-22input: remove XI2 keysym grabs, use keycode grabs instead.Peter Hutterer2-4/+1
Keysym grabs are tricky in the details, keycode grabs are known to work. So for now, provide keycode grabs only. Requires inputproto 1.9.99.15. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-19dix: xserver "make dist" fails due to eventconvert.h (#27825)Gaetan Nadon1-1/+0
This header file is not in the /dix dir, but in the /include dir. The makefile aborted and the xserver distribution files were not created. The fix is to remove this header file from the libdix_la_SOURCES in the dix/Makefile.am. X.Org Bug 27825 <http://bugs.freedesktop.org/show_bug.cgi?id=27825> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-17Revert "Coverity Prevent: RESOURCE_LEAK in AccelSetProfileProperty:"Oliver McFadden1-4/+0
This reverts commit 7333dc2969f60af0abcfb28e7182a5fff9918223. False positive.
2009-07-16Coverity Prevent: RESOURCE_LEAK in AccelSetProfileProperty:Oliver McFadden1-0/+4
Event alloc_arg: Called allocation function "XIPropToInt" on "ptr" [details] 167 rc = XIPropToInt(val, &nelem, &ptr); Event leaked_storage: Variable "ptr" goes out of scope
2009-07-15xserver: remove unused code in clipValuatorsÉric Piel1-2/+1
The axes variables was never used, remove it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>