summaryrefslogtreecommitdiff
path: root/mi
AgeCommit message (Collapse)AuthorFilesLines
2011-09-01Add a DDX specific GLX provider push hookJon TURNEY1-1/+10
This is needed to give DDX which are statically linked with extensions a chance to install DDX specific GLX providers before the GLX extension is initialized The the swrast provider is installed just before GLX extension is initialized. The GLX extension asks providers if they can support a screen in the reverse of the provider installation order, so installing a DDX-specific GLX provider earlier than this is not useful, as it will always lose out to swrast. Installing the provider later than this is not useful as the provider for each screen has already been selected during GLX extension initialization. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2011-08-03composite: Inhibit window background paint with manual subwindow redirectionVille Syrjälä1-0/+4
The composite extension spec says that window background painting should be inhibited when the subwindow redirection mode is set to manual. This eliminates the ugly flashing effect when compiz unredirects a fullscreen window. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Owen Taylor <otaylor@fishsoup.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-07-01input: add POINTER_NORAW to avoid generation of raw events (#30068)Peter Hutterer1-1/+1
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>
2011-05-24input: Don't implicitly define verify_internal_eventJeremy Huddleston1-0/+1
Fixes regression introduced by 56901998020b6f443cbaa5eb303100d979e81b22 mieq.c:159:5: error: implicit declaration of function 'verify_internal_event' is invalid in C99 [-Wimplicit-function-declaration,Semantic Issue] verify_internal_event(e); ^ 1 error generated. Also includes some other warning cleanups in events.c we're there. events.c:2198:24: warning: equality comparison with extraneous parentheses [-Wparentheses,Semantic Issue] else if ((type == MotionNotify)) ~~~~~^~~~~~~~~~~~~~~ events.c:2198:24: note: remove extraneous parentheses around the comparison to silence this warning [Semantic Issue] else if ((type == MotionNotify)) ~ ^ ~ events.c:2198:24: note: use '=' to turn this equality comparison into an assignment [Semantic Issue] else if ((type == MotionNotify)) ^~ = events.c:2487:5: error: implicit declaration of function 'verify_internal_event' is invalid in C99 [-Wimplicit-function-declaration,Semantic Issue] verify_internal_event(event); ^ events.c:5909:22: warning: declaration shadows a local variable [-Wshadow,Semantic Issue] DeviceIntPtr it = inputInfo.devices; ^ events.c:5893:18: note: previous declaration is here DeviceIntPtr it = inputInfo.devices; ^ 3 warnings and 1 error generated. events.c:2836:27: warning: incompatible pointer types passing 'DeviceEvent *' (aka 'struct _DeviceEvent *') to parameter of type 'const InternalEvent *' (aka 'const union _InternalEvent *') verify_internal_event(ev); ^~ ../include/inpututils.h:40:56: note: passing argument to parameter 'ev' here extern void verify_internal_event(const InternalEvent *ev); ^ 1 warning generated. Found-by: yuffie tinderbox (-Werror=implicit) Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-05-14XQuartz: Don't call mieqEnqueue during server shutdownJeremy Huddleston1-8/+8
Found-by: GuardMalloc Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-11input: replace EventListPtr with InternalEvent arrayPeter Hutterer2-40/+12
EventListPtr is a relic from pre-1.6, when we had protocol events in the event queue and thus events of varying size. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-06input: change CHECKEVENT macro to verify_internal_event functionPeter Hutterer1-5/+5
The macro is sufficient if called during a development cycle, but not sufficient information when triggered by a user (e.g. https://bugzilla.redhat.com/show_bug.cgi?id=688693). Expand what this does to print the event content and a backtrace, so at least we know where we're coming from. Only the first 32 bytes are printed since if something goes wrong, the event we have is almost certainly an xEvent or xError, both restricted to 32 bytes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-04-04mi: fix memory leak in miZeroLineTiago Vignatti1-2/+4
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-04mi: fix memory leak in miFillUniqueSpanGroupTiago Vignatti1-0/+2
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-04mi: fix memory leak in miInitVisualsTiago Vignatti1-0/+2
Free the pointers inside miInitVisuals, so the callers of this function (fboverlay.c and fbscreen.c) don't need to worry with deallocation in the case of failure. 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-04xorg: remove unused pointer values all over the serverTiago Vignatti2-10/+1
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-03-14mi/misprite: use memory management provided by dixRegisterPrivateKeyErkki Seppälä1-22/+19
The record allocated by miSpriteDeviceCursorInitialize was not being released. This patch makes misprite use dixRegisterPrivateKey with the record size argument, which handles the memory management issues. miSpriteDeviceCursorInitialize is restructured to initialize pCursorInfo only if miDCDeviceInitialize succeeds. The record itself is zeroed on cleanup to ensure that the assumptions in the code still hold. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
2011-03-14mi: Call pScreen->ConstrainCursorHarder from the position update pathAdam Jackson1-0/+6
v2: Cover more paths, spotted by Daniel Stone. v3: pass down the mode field for movement mode. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-14Add mode field to pointer movement hooks.Peter Hutterer2-1/+6
Preparation work for pointer barriers. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-02-22Move master/lastSlave out of the union into separate fields.Peter Hutterer1-1/+1
The removal of the double-use will cause some suble bugs as some conditions to check for the dev->u.master case were broken and also evaluated as true if lastSlave was set (instead of master). Also breaks the input ABI. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
2011-02-22input: Change a bunch of direct dev->u.master accesses to use GetMaster()Peter Hutterer1-4/+6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
2011-02-22mi: check for MASTER_POINTER instead of manual checks.Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
2011-02-22mi: update macro to search for MASTER_POINTERPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
2011-02-22Switch to use IsFloating()Peter Hutterer3-13/+13
This is not a straightforward search/replacement due to a long-standing issue. dev->u.master is the same field as dev->u.lastSlave. Thus, if dev is a master device, a check for dev->u.master may give us false positives and false negatives. The switch to IsFloating() spells out these cases and modifies the conditions accordingly to cover both cases. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
2011-02-22Fix two incorrect checks for master devices.Peter Hutterer1-1/+1
These two were sideeffects of lastSlave being in the same field as the master. For devices generated by the master device directly, lastSlave was 0 and the device would (with the old checks) be interpreted as floating. Add the required checks to safeguard against master devices. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
2011-02-22mi: simplify a "check for keyboard" conditionPeter Hutterer1-2/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
2011-02-22mi: remove if 0 code.Peter Hutterer1-25/+0
Note sure why this is in if 0 but it's been that way since 2007. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
2011-02-22mi: Add a few comments explaining various cursor move functions.Peter Hutterer1-15/+138
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
2011-02-22mi: remove static GenerateEvent variable.Peter Hutterer2-4/+6
Push into the respective devices. This should have no functional changes since we never warp more than one device at a time. In the glorious future with true multithreading, still the better thing to do. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
2011-01-07NO_PANORAMIX preprocessor symbol is nowhere definedTomas Carnecky1-2/+0
Which makes it useless, so remove it. Signed-off-by: Tomas Carnecky <tom@dbservice.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-01-05Call SourceValidate even if src == dstVille Syrjälä1-2/+1
The extra SourceValidate calls from damageCopyArea and damageCopyPlane can be removed. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-01-05Add subWindowMode parameter to SourceValidateVille Syrjälä2-4/+6
Pass the subWindowMode from the GC/source Picture to SourceValidate. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-31mi: Only register sprite block handler when neededPauli Nieminen1-10/+25
miSpriteBlockHandler takes about 10us in arm each time BlockHandlers are called. To eliminate that overhead from xserver side only register the BlockHandler when there actually is any cursor down. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31mi: Register sprite damage handler only when requiredPauli Nieminen1-1/+11
There is no need to have damage handler registered when there isn't any pointer in the screen. This avoids some overhead from damage handling which takes tens of microseconds on arm. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31mi: Fix the debug messagePauli Nieminen1-1/+1
Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31mi: Fix wrapping for sprite screenPauli Nieminen1-22/+25
SCREEN_EPILOGUE should read the current function pointer from screen after calling wrapped function in case the pointer changes. Passing pPriv to macros instead of asking dix each time makes sense when both macros need same pointer. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31mi: Add GetSpriteScreen macro to hide dixLookupPrivatePauli Nieminen1-13/+10
Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-07Sun's copyrights now belong to OracleAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07mi: handle DGA subtypes when determining the master device.Peter Hutterer1-1/+7
The subtype in the DGA event is the core type and all ET_ event types (where applicable) are identical to the core types. Thus the switch statement below will work as required and assign the right master device. Fixes a crasher bug on keyboard devices with valuators. If a device sends a motion event while grabbed and a DGA client is active (but has not selected input through DGA), the valuator event is posted through the VCK and eventually results in a NULL-pointer dereference on dev->valuator. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-30mi: Remove unused miAllocateGCPrivateIndexAdam Jackson2-15/+0
Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30dix: Remove unused ChangeSaveUnder hooksAdam Jackson1-2/+0
Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30dix: Remove the backing store leftoversAdam Jackson6-111/+2
Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-11Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into ↵Peter Hutterer2-2/+2
input-api Conflicts: dix/getevents.c hw/xfree86/common/xf86Xinput.h Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-10Merge remote branch 'whot/for-keith'Keith Packard1-1/+1
2010-11-10mi: Integer overflow for dashed lines longer than 46340. #31093Siddhesh Poyarekar1-1/+1
Lines of length greater than 46340 can be drawn with one of the coordinates being negative. However for dashed lines, miPolyBuildPoly overflows the int type when setting up edges for a section of the dashed line. This results in the dashed segments not being drawn at all. Signed-off-by: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-11Remove more superfluous if(p!=NULL) checks around free(p).Cyril Brulebois1-1/+1
This patch has been generated by the following Coccinelle semantic patch: @@ expression E; @@ - if (E != NULL) - free(E); + free(E); Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-22Abstract valuator masks through a set of APIs.Peter Hutterer1-1/+5
This commit introduces an abstraction API for handling masked valuators. The intent is that drivers just allocate a mask, set the data and pass the mask to the server. The actual storage type of the mask is hidden from the drivers. The new calls for drivers are: valuator_mask_new() /* to allocate a valuator mask */ valuator_mask_zero() /* to reset a mask to zero */ valuator_mask_set() /* to set a valuator value */ The new interface to the server is xf86PostMotionEventM() xf86PostButtonEventM() xf86PostKeyboardEventM() xf86PostProximityEventM() all taking a mask instead of the valuator array. The ValuatorMask is currently defined for MAX_VALUATORS fixed size due to memory allocation restrictions in SIGIO handlers. For easier review, a lot of the code still uses separate valuator arrays. This will be fixed in a later patch. This patch was initially written by Chase Douglas. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-13event_size is currently never assigned to in mieqProcessInputEvents().Jon TURNEY1-0/+4
event_size is never assigned to in mieqProcessInputEvents(), so realloc() is always called. This is benign, but I'm guessing not intended. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-18Introduce per-object per-screen privates.Jamey Sharp1-23/+19
This replaces dixCreatePrivateKey and the only uses, which were in midispcur. Commit by Jamey Sharp and Josh Triplett. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-09-13miPolyGlyphBlt: Delete redundant ValidateGC.Jamey Sharp1-2/+0
The caller is required to have validated the GC for the drawable before calling any ops, including PolyGlyphBlt. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-09-10mi: delete unused codeTiago Vignatti1-4/+1
pBSReg is always NULL, so the statement after the conditional will never be reached. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-07-09miModifyPixmapHeader: always update serialNumberJesse Barnes1-1/+1
We should update the serial number even if we just change a single field. Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-07-07mi: rename miPointerMoved to miPointerMoveNoEvent.Peter Hutterer1-5/+5
Having miPointerMove and miPointerMoved is confusing, especially since both do the same thing bar the event delivery. Also, miPointerMove calls miPointerMoved which indicates some confusion in the temporal alignment of cause and effect. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-07-07mi: De-duplicate some code in mipointer.cPeter Hutterer1-16/+2
miPointerMoved already has the same code. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-07-02Add API to update setting of waitForUpdate screen private in miPointerAlan Coopersmith2-0/+21
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>