summaryrefslogtreecommitdiff
path: root/dix
AgeCommit message (Collapse)AuthorFilesLines
2009-10-02dix: force a minimum of 0 for screen coordinates.Peter Hutterer1-0/+13
Currently the root coordinates may fall into ]-1..0] if the subpixel remainder is less than 0. Screen coordinates mustn't go below 0, so use miPointerSetPosition to cap off the remainder if the coordinates are below 0. This is cheating a bit, a more comprehensive solution to deal with subpixels correctly when crossing screens is needed. For now, this'll do. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Simon Thum <simon.thum@gmx.de> (cherry picked from commit 45f447dafded5adfe11b7df3325c2d8f6ae0639b)
2009-09-30dix/glx/composite: consolidate visual resize in one place.Dave Airlie1-0/+64
The previous code was copied and in both cases incorrectly fixed up the colormaps after resizing the visuals, this patch consolidates the visual resize + colormaps fixups in one place. This version also consolidates the vid allocation for the DepthPtr inside the function. I'm not 100% sure colormap.[ch] is the correct place for this but visuals are mostly created in fb and I know thats not the place to be resizing them. Fixes fd.o bug #19470. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 6ffda5aae75272fabdc27d6f693ae827be119e95)
2009-09-27Add (ok, fix) support for DTrace under OS XBen Byer2-1/+8
(cherry picked from commit 8428a57184f542941d2c8c90e97d18e111a69dd2)
2009-09-26dix: plug memory leak in DeviceEnterLeaveEvents.Peter Hutterer1-1/+3
'event' must be freed before exiting. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit fd913136732ff14a0484ca28f60ac1fbf49be81d)
2009-09-25dix: report XI1 axis values correctly if first_valuator != 0Thomas Jaeger1-6/+6
Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 5402f18d9c3f7ba19cc05b3a814e3a9e94c8d551)
2009-09-25dix: move bounds check before accessSimon Thum1-2/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 824a09d856a5f750694e11d2fd2faaa3de705eaa)
2009-09-22input: don't use typecasts to access members of InternalEvent.Peter Hutterer2-10/+10
To avoid confusion, the member names are now postfixed with _event. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-20Eliminate bogus event resizing.Keith Packard2-37/+0
Now that all event queues hold internal events only, they never need to be resized. Resizing them led to memory corruption as they would get sized for an appropriate xEvent, not an internal event. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-18xfree86: use SendDevicePresenceEvents instead of manual event handling.Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-16dix: append "built-ins" to the font path in SetDefaultFontPathRémi Cardona1-2/+25
49b93df8a3002db7196aa3fc1fd8dca1c12a55d6 made the hard dependency on a "fixed" font go away but only Xorg could use the built-ins fonts by default. With this commit, all DDXs get "built-ins" appended to their FontPath, not just Xorg. Tested with Xorg, Xvfb and Xnest. Signed-off-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-14dix: FindChildForEvent needs init child to None.Peter Hutterer1-1/+1
silences compiler warning: events.c: In function 'FixUpEventFromWindow': events.c:2262: warning: 'child' may be used uninitialized in this function Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-10dix: Remove two _X_EXPORT defines from the function definition.Peter Hutterer1-2/+2
These two are defined _X_EXPORT in their declaration anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-09dix: auto-float SD's with SendCoreEvents "false"Peter Hutterer1-4/+13
AlwaysCore and SendCoreEvents specify whether a device is to send core events. A device that has either disabled is not supposed to send core events. With MPX/XI2, a device that is attached automatically sends core events when the event is routed through the master device. Floating a slave device disables core events by breaking the route. This patch automatically floats devices that have coreEvents disabled in the xorg.conf/HAL. This replicates the behaviour of a SendCoreEvents "false" device in server 1.6 and earlier. The devices may still be reattached to a master at runtime. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-09dix: remove unused and half-broken code to restore original classes.Peter Hutterer1-23/+4
In theory, the MD should change back to its old, original classes when the last SD is detached. Thanks to the XTEST devices, we'll always have an SD attached until the MD is removed. So let's not worry about that and do nothing instead of having some code that's essentially untested. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-08dix: GetKeyboardValuatorEvents doesn't recurse anymore - fix comment.Peter Hutterer1-4/+0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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-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>