summaryrefslogtreecommitdiff
path: root/dix
AgeCommit message (Collapse)AuthorFilesLines
2009-11-04Merge remote branch 'jeremyhu/master'Keith Packard1-5/+3
2009-11-04dix: Fixes a memory leak when a cursor resource is released.Rami Ylimaki1-1/+2
Just open and close a client that creates cursors in order to reproduce. In the problem case bits->refcnt is -1 and therefore bits->devPrivates is never released. Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-03dix: Properly detect if the other device is frozenJeremy Huddleston1-5/+3
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-10-23dix: Fix up colormap fixup.Adam Jackson1-0/+3
FindClientResourcesByType() will walk all colormaps on all screens; we only want to fix up the current screen. Otherwise, screens > 0 will have the visual pointers for their colormaps pointing off into space. Signed-off-by: Adam Jackson <ajax@redhat.com>
2009-10-22Resolve an inconsistency between libX11 and Xserver over GetModifierMappingJon TURNEY1-5/+3
libX11 ModMap.c believes that GetModifierMapping can never return an error Xserver devices.c believes that GetModifierMapping can return an error if the ModMap couldn't be generated According to the protocol document I have, libX11 is right, so adjust the server to send back an empty modmap if one couldn't be made... http://bugs.freedesktop.org/show_bug.cgi?id=24621 Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-10-15Remove CopyISOLatin1LoweredYaakov Selkowitz1-10/+0
This function was moved verbatim into libXfont-1.4, and it is not used by the server or any drivers. Exporting it in both places leads to multiple definition linking errors on Cygwin, where we need to use a static libXfont due to poor weak-symbol handling. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-10-14Remove some debug messages that trigger on XACE event delivery failure.Eamon Walsh1-9/+3
It is normal for XACE to deny an event delivery, so these log messages shouldn't trigger when that happens. Just drop them for now. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-10-14xace: Fake return values on denials in input polling requests.Eamon Walsh2-2/+14
Instead of returning BadAccess when "read" permission is denied on a device, falsify the device state (buttons down, keys pressed). This is nicer to applications, but may still have undesired side effects. The long-term solution is not to use these requests in event-driven code! Requests affected: QueryPointer, QueryKeymap, XiQueryDevice. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-10-13dix: extend IsPointerDevice check to valuator-only devices.Peter Hutterer1-1/+3
A device with valuators but no keys is definitely a pointer device and needs to be attached to the VCP. Otherwise, the class copying happens on the VCK and the VCP isn't updated with the events that are to be sent through it. This addresses the trigger for #24441, not the actual issue. Jury is still out on valuator+key devices. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-10-08Fix make warning: overriding commands for target `dix.O'Alan Coopersmith1-1/+2
Not only does automake generate unnecessary rules for dix.O on platforms for which SPECIAL_DTRACE_OBJECTS is false, it generates duplicate sets when "if SPECIAL_DTRACE_OBJECTS" is nested inside "if XSERVER_DTRACE" Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-10-08Cast small-int values through intptr_t when passed as pointersJamey Sharp1-2/+2
On 64-bit systems, int and pointers don't have the same size, so GCC gives warnings about casts between int and pointer types. However, in the cases covered by this patch, it's always a value that fits in int being stored temporarily as a pointer and then converted back later, which is safe. Casting through the pointer-sized integer type intptr_t convinces the compiler that this is OK. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-10-07dix: Fix a double free in dixFreePrivates.Francisco Jerez1-0/+1
It can be reproduced when the server is regenerated and for some reason the private keys are reassigned in a different order: a manually allocated private may get an index formerly used by a preallocated private. In that case it will first be manually freed and then again by dixFreePrivates, as items[i].size was never zeroed out. Do it in dixResetPrivates. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Acked-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-10-06Use $(AM_V_GEN) to silence more commands when AM_SILENT_RULES is activeAlan Coopersmith1-3/+3
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Dan Nicholson <dbn.lists@gmail.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-10-06Add platform tests for Dtrace linker magicAlan Coopersmith1-1/+1
Replaces special handling for Xquartz DDX and scales better to handling the multiple platforms that now have some level of Dtrace support available. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
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>
2009-09-30dix: Fix potential memory corruption in doListFontsWithInfo.Kim Woelders1-1/+1
Signed-off-by: Kim Woelders <kim@woelders.dk> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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>
2009-09-27Add (ok, fix) support for DTrace under OS XBen Byer2-1/+8
(cherry picked from commit 8428a57184f542941d2c8c90e97d18e111a69dd2)
2009-09-24Fix build of unit tests when dtrace probes are enabledAlan Coopersmith1-2/+2
ar loses the dtrace probe magic when building static libraries, so we have to link with the .O files in order to resolve the dtrace probe symbols. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-09-25dix: 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>
2009-09-24dix: 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>
2009-09-22dix: move bounds check before accessSimon Thum1-2/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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>