summaryrefslogtreecommitdiff
path: root/Xext
AgeCommit message (Collapse)AuthorFilesLines
2011-04-07Xext: fix test on extension number for the swapped case.Matthieu Herrb1-1/+1
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Julien Cristau <jcristau@debian.org> (cherry picked from commit 552c78592c5e5f52fe16e2429f77c63adf398247)
2011-04-04xorg: remove unused pointer values all over the serverTiago Vignatti1-4/+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-02-02Merge remote branch 'jturney/master'Keith Packard1-45/+44
2011-02-02xselinux: Fix GetDrawableContextAdam Jackson1-4/+2
M_DRAWABLE_PIXMAP is the lookup mask to dixLookupDrawable, and _not_ the type value in the drawable itself. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-01-25Fix compilation of xf86bigfont.cJon TURNEY1-45/+44
xf86bigfont.c: In function 'XFree86BigfontExtensionInit': xf86bigfont.c:146: error: 'ProcXF86BigfontDispatch' undeclared (first use in this function) xf86bigfont.c:147: error: 'SProcXF86BigfontDispatch' undeclared (first use in this function) It seems this has been broken since commit cbd4d5dbb70db62ba1cb79c7b904e6fa11f62d7e "delete pervasively use of DISPATCH_PROC" (2010-09-28), which is a bit worrying as that presumably indicates that no tinderbox is configuring with --enable-xf86bigfont. In a similar fashion to that commit, fix by moving XFree86BigfontExtensionInit() below the definitions of the static dispatch functions it references. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-01-05X Sync CleanupsJames Jones1-56/+86
Various cleanups identified during review of the X Sync Fence Object patches. -Correctly handle failure of AddResource() -Don't assert when data structures are corrupt. Instead, use a new helper function to check for counter sync objects when they're expected, and warn if the type is wrong. -Use the default switch label rather than reimplementing it. -Re-introduce cast of result of dixAllocateObjectWithPrivate() to kill an incompatible pointer type warning. -Remove comments claiming protocol updates are needed. One wasn't true and the other was addressed with a xextproto change. -Return BadFence, not BadCounter from XSyncAwaitFence() Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-31Resources: Move rClient to resource.hDaniel Stone2-4/+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-20Remove SCO supportAdam Jackson1-1/+1
This has never been buildable in any modular server release. Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-12-19IDLETIME: Fix edge-case in IdleTimeBlockHandlerChristopher James Halse Rogers1-0/+8
Ensure that if we're called exactly on the threshold of a NegativeTransition trigger that we reshedule to pick up an idle time over the threshold. Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-19Xext: Fix edge case with {Positive, Negative}Transition triggers.Christopher James Halse Rogers1-0/+22
The {Positive,Negative}Transition triggers only fire when the counter goes from strictly {below,above} the threshold. If SyncComputeBracketValues gets called exactly at this threshold we may update the bracket values so that the counter is not updated past the threshold. Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-06sync: syncObject may be None in SyncInitTriggerKeith Packard1-2/+2
And often is, especially when called from ProcSyncCreateAlarm. Crashing in this case seems unwise. Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-06Expose Sync Fence Object protocolJames Jones1-0/+24
Add the new protocol handlers for XSync 3.1 to the dispatch tables and report support for Sync protocol version 3.1. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06Add XSyncAwaitFence() handlerJames Jones2-32/+152
-Add the actual ProcSyncAwaitFence() dispatch func -Add support for fence sync triggers. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06Create/Destroy/Trigger/Reset/Query Fence Sync objsJames Jones3-5/+272
Initial server side implementation of fence sync objects. Allows creation, management, and state queries of binary state objects. Currently they are not very useful as there is no way to wait for them efficiently. The basic trigger operation added here triggers relative to a given X screen's rendering operations. To perform this operation, fence sync objects must be tied to a screen. As Aaron Plattner pointed out, screens are identified but a drawable in X protocol, so a drawable argument is included in XSyncCreateFence(). The screen also could have been specified as part of the trigger operation. However, it is also desireable to associate a screen with fence sync objects at creation time so that the associated screen's driver can allocate any HW- specific resources needed by the fence object up front. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06Add fence sync driver interfaceJames Jones1-1/+5
-Add fence sync objects -Add fence sync devPrivates -Add a X sync module screen private -Add wrappable functions to create and destroy fence sync objects -Give fence sync objects wrappable functions to trigger, test, and reset their 'triggered' value. -Give fence sync objects wrappable functions to notify driver when adding/removing triggers to/ from the sync object. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06Move some sync code to miextJames Jones2-42/+3
As a precursor to the fence sync object video driver and extension API, move some code from Xext to miext/sync. Most of this is just code to set up the build system to include the new directory. No functional code is added in this change. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06Factor out generic code from ProcSyncAwait()James Jones1-43/+63
In preparation for adding more sync object types that will need Await requests of their own, factor out some setup and finalization code from ProcSyncAwait() into SyncAwaitPrologue() and SyncAwaitEpilogue() Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06Make Await SyncTrigger functions genericJames Jones2-114/+200
Update all the functions dealing with Await sync triggers handle generic sync objects instead of just counters. This will facilitate code sharing between the counter sync waits and the fence sync waits. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06Create SyncObject base type.James Jones2-38/+73
SyncObject is now the base type for SyncCounter. Data to be used by all sync types is stored in the base object. SyncCounter can be safely cast to SyncObject, and a SyncObject can be cast to the correct type based on SyncObject::type. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-12-06Add and use SERVER_SYNC_*_VERSIONJames Jones1-2/+3
Most extensions have a version defined in the protocol headers, and also in the server's protocol-versions.h. The latter defines which version the server advertises support for. Sync wasn't included in protocol-versions.h, and was advertising support for whatever was in the protocol headers the server was built against. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-11-30composite: add panoramix supportDavid Reveman1-0/+7
Taken from: 50d2d8c8969c165582d215c6e85c4be9eac02b6a dbffd0d44a33dcc84898c7a891d7ba212f65cbb8 9b5b102163b4eaa1b70647354fcab4f6e461c94c 75f9b98af31abf537ac6616c99f3797deb7ba017 07fba8b1f77a6bca44ea6568b346a18ce9d1e61d With minor style fixes, ported to dixLookupResourceByType, and ported away from client->noClientException and xalloc/xfree. v2: Fix a memory leak in PanoramiXCompositeNameWindowPixmap, spotted by James Jones. v3: Fix a buglet in PanoramiXCompositeUnredirectSubwindows, spotted by Dave Airlie. v4: Fix a style issue with resource lookup noted by Jamey Sharp. Reviewed-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30fixes: Add panoramix supportDavid Reveman2-0/+10
Taken from: 583f4dde81d8d5e9101b0289946e1914ea1ee124 With minor style fixes and ported to dixLookupResourceByType. Reviewed-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-15Xext: panoramiXprocs: fix typoLinus Arver1-1/+1
This fixes a typo introduced in commit 80b5d3a3264d2c5167e5ac85a3b04af0f89cece1. The pointer pDst was changed unintentionally to pWin from a copy/paste error. This resulted in all QT-based apps and some tcl/tk ones (like fontforge) to crash X 1.9 on starting up, when Xinerama was enabled. Bug report: https://bbs.archlinux.org/viewtopic.php?id=106125 Signed-off-by: Elie Bleton <drozofil@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Tested-by: Linus Arver <linusarver@gmail.com>
2010-10-22Abstract valuator masks through a set of APIs.Peter Hutterer1-4/+6
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-09-28xserver: delete pervasively use of DISPATCH_PROCTiago Vignatti8-463/+345
Some functions had to be moved around due some missing static definitions. Another minor clean up like inexistent function declarations and etc were made also. Part of this patch was cooked using: sed -i -e '/static DISPATCH_PROC*.*;/d' `git ls-files` Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-10xext: remove unused headerTiago Vignatti1-1/+0
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-08-10xace: Invalid reference to out-of-scope data.Chris Wilson1-95/+75
The callback data passed by reference to the hook was allocated on stack within the scope of the case statement. The compiler is free to reuse any of that stack space whilst making the function call so we may end up passing garbage into the callback. References: Bug 18451 - Xorg server 1.5.2 SEGV during XFixesGetCursorImage() https://bugs.freedesktop.org/show_bug.cgi?id=18451 v2: Drop the unrelated hunk that snuck in when ammending the commit message. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-21xv: Don't send port notify when SetPortAttribute failsVille Syrjälä1-3/+4
Currently a port notify event is sent even if SetPortAttribute fails. Furthermore the value field in the event will contain the value that was specified in the failed request. So any client interested in the actual value of the attribute will have to double check the current value with GetPortAttribute after receiving a port notify event. Fix the problem by sending port notifications only when SetPortAttribute succeeds. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-10Merge remote branch 'alanc/master'Keith Packard1-3/+5
2010-06-10Fix a couple more possible errors with input-only windowsKeith Packard1-1/+1
Using type == DRAWABLE_WINDOW to differentiate between pixmaps and windows isn't sufficient as input-only windows will end up in the pixmap case. This patch changes a few more code paths to use WindowDrawable instead. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-06-10SecurityResource should not segfault when client owning resource has exitedSam Lau1-3/+5
Fixes OpenSolaris bug 6949754: Xorg crashes when the magnifier is enabled at gdm login greeter window. http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6949754 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2010-06-10Remove unnecessary parentheses around return values in functionsMikhail Gusarov9-102/+102
This patch was generated by the following Perl code: perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;' Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-07If XTest is always required, then eliminate the XTest devPrivateKeith Packard1-27/+6
The internals of XTest are used by Xi and Xkb, and both Xi and Xkb are always required, so it makes little sense to have XTest place data in a devPrivate, especially a devPrivate which is only available when the XTest extension is enabled. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-06Initialize private keys in test suiteKeith Packard1-1/+7
Make sure all of the private keys used by the test code are initialized before being used. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Robert Hooker <sarvatt@ubuntu.com>
2010-06-06Remove more superfluous if(p) checks around free(p)Mikhail Gusarov4-10/+6
This patch has been generated by the following Coccinelle semantic patch: @@ expression E; @@ -if(E) { free(E); } +free(E); Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-06-06Replace deprecated bzero with memsetMikhail Gusarov2-3/+3
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Marcin Baczyński <marbacz@gmail.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-06-05Clean up after removal of screen parameters from region macros.Jamey Sharp3-20/+6
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-06-05Change the devPrivates API to require dixRegisterPrivateKeyKeith Packard11-48/+82
This patch only changes the API, not the implementation of the devPrivates infrastructure. This will permit a new devPrivates implementation to be layed into the server without requiring simultaneous changes in every devPrivates user. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-06-05Change region implementation from macros to inline functions.Keith Packard1-1/+1
This makes all of the previous macros into inline functions and also turns all of the direct calls to pixman region code into inline functions as well. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-05Rename region macros to eliminate screen argumentKeith Packard4-61/+61
This is a combination of a huge mechanical patch and a few small fixups required to finish the job. They were reviewed separately, but because the server does not build without both pieces, I've merged them together at this time. The mechanical changes were performed by running the included 'fix-region' script over the whole tree: $ git ls-files | grep -v '^fix-' | xargs ./fix-region And then, the white space errors in the resulting patch were fixed using the provided fix-patch-whitespace script. $ sh ./fix-patch-whitespace Thanks to Jamey Sharp for the mighty fine sed-generating sed script. The hand-done changes involve removing functions from dix/region.c that duplicate inline functions in include/regionstr.h, along with their declarations in regionstr.h, mi.h and mispans.h. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-03Accumulate graphics exposures incrementally in PanoramiXCopyArea/Plane.Jamey Sharp1-36/+26
This fuses two loops in each function, eliminating an intermediate MAXSCREENS-sized array from each. Aside from being more efficient, I believe this is equivalent to the previous implementation, since - each per-screen GC has the graphicsExposures flag set the same way, and - the REGION_* macros ignore their screen argument. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
2010-06-03Delete XineramaScreenRegions cache.Jamey Sharp1-17/+20
Every screen region consists of a single rectangle, so initializing a stack-allocated region for each screen on-demand does no heap allocation and is fast. This eliminates a MAXSCREENS-sized array. The REGION_UNINIT calls are no-ops since no boxes are actually allocated for a single-rectangle region, but it seemed wiser to include them. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
2010-06-03XineramaSetCursorPosition: use screen bounds directly, not POINT_IN_REGION.Jamey Sharp2-3/+1
This hides a MAXSCREENS-sized array as an implementation detail of panoramiX.c rather than an exported global. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
2010-06-03Move each screen's x/y origin into ScreenRec.Jamey Sharp4-83/+83
Many references to the dixScreenOrigins array already had the corresponding screen pointer handy, which meant they usually looked like "dixScreenOrigins[pScreen->myNum]". Adding a field to ScreenRec instead of keeping this information in a parallel array simplifies those expressions, and eliminates a MAXSCREENS-sized array. Since dix declared the dixScreenOrigins array, I figure allocating a screen private for these values is overkill. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
2010-06-03Delete panoramiXdataPtr: it's redundant.Jamey Sharp6-111/+90
This eliminates a dynamically-allocated MAXSCREENS-sized array. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
2010-06-03Move each screen's root-window pointer into ScreenRec.Jamey Sharp3-11/+11
Many references to the WindowTable array already had the corresponding screen pointer handy, which meant they usually looked like "WindowTable[pScreen->myNum]". Adding a field to ScreenRec instead of keeping this information in a parallel array simplifies those expressions, and eliminates a MAXSCREENS-sized array. Since dix uses this data, a screen private entry isn't appropriate. xf86-video-dummy currently uses WindowTable, so it needs to be updated to reflect this change. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
2010-06-03Move each screen's screensaver data into ScreenRec.Jamey Sharp3-14/+15
Most references to the savedScreenInfo array already had the corresponding screen pointer handy, which meant they usually looked like "savedScreenInfo[pScreen->myNum]". Adding a field to ScreenRec instead of keeping this information in a parallel array simplifies those expressions, and eliminates a MAXSCREENS-sized array. Since dix uses this data, a screen private entry isn't appropriate. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
2010-06-03xext: delete wrong source reference from fontcacheTiago Vignatti1-1/+0
This should go away in 0b45ba48. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-06-02Only deal with input code when changing the input shape.Pierre-Loup A. Griffais1-2/+2
Propagate the shape kind all the way to SetShape to avoid performing non-input operations such as revalidating the tree and generating exposures when only changing a window's input shape. Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Acked-by: Aaron Plattner<aplattner@nvidia.com> Reviewed-by: Daniel Stone<daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-26xf86bigfont: Silence compiler warning by initializing pDesc.Jamey Sharp1-3/+1
Access to pDesc was always guarded by (nCharInfos > 0), so the code wasn't actually buggy, but this makes it clear that it's correct. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com>