summaryrefslogtreecommitdiff
path: root/miext
AgeCommit message (Collapse)AuthorFilesLines
2011-02-27Revert "rootless: Remove ROOTLESS_WORKAROUND"Jeremy Huddleston1-1/+5
Christof Wolf has reported a regression that seems to be caused by this change, so reverting the change in the 1.9 branch. We'll investigate a proper fix in master for 1.10. This reverts commit c89f0521044083a11d538ebfeaabee6fc7fb9a03. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-02-08shadow: Remove hw/xfree86/ from includesAdam Jackson1-2/+0
Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-02-08rootless: Remove hw/xfree86/ from includesAdam Jackson1-1/+0
Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-02-08damage: Remove hw/xfree86/ from includesAdam Jackson1-1/+1
Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-01-05Call SourceValidate even if src == dstVille Syrjälä1-22/+0
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/+7
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-27mi: Sync: Don't free managed screen privateDaniel Stone1-1/+0
misync allocates space for its screen private with dixRegisterPrivateKey, which means it doesn't have to free it at CloseScreen time; doing so will, in fact, result in a crash. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: James Jones <jajones@nvidia.com> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-12-06Add fence sync driver interfaceJames Jones3-2/+233
-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 Jones5-2/+149
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-11-30dix: Remove the backing store leftoversAdam Jackson1-12/+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-10Merge remote branch 'whot/for-keith'Keith Packard2-6/+3
2010-11-10shadow: Optimize shadowUpdatePacked(). (#26973)Adam Jackson1-2/+2
Signed-off-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Soren Sandmann <sandmann@daimi.au.dk> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-11Remove more superfluous if(p!=NULL) checks around free(p).Cyril Brulebois1-2/+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-11-11Remove superfluous if(p!=NULL) checks around free(p); p=NULL;Cyril Brulebois1-4/+2
This patch has been generated by the following Coccinelle semantic patch: @@ expression E; @@ - if (E != NULL) { - free(E); ( - E = NULL; | - E = 0; ) - } + free(E); + E = NULL; Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-09-13rootless: Delete dead remnants of rootless acceleration.Jamey Sharp4-158/+11
Jeremy deleted rootlessAccelInit's implementation in 2008 in commit 587c010a1cd733fded4d49dc339df0634bda8be6. Delete its prototype and the remaining commented-out call to it. It still makes sense for the rootless GC ops to relax the planemask, but that's independent of the size of the operation, so quit checking the thresholds there. FillBytes and CompositePixels are not called anywhere, so delete everything related to both. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Jeremy Huddleston <jeremyhu@apple.com> Cc: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-13rootless: ROOTLESS_GLOBAL_COORDS is always set, so unifdef it.Jamey Sharp5-26/+3
Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Jeremy Huddleston <jeremyhu@apple.com> Cc: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-13rootless: ROOTLESS_TRACK_DAMAGE is never set, so unifdef it.Jamey Sharp5-85/+5
Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Jeremy Huddleston <jeremyhu@apple.com> Cc: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-13Delete redundant GC initializations.Jamey Sharp2-2/+0
When a GC is allocated, it is zeroed, including all storage requested with dixRegisterPrivateKey. So CreateGC hooks don't need to initialize anything to zero. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-09-13Delete unused devPrivate field from GCFuncs and GCOps.Jamey Sharp1-1/+0
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-13damage: Delete NOTUSED block--it was never not NOTUSED.Jamey Sharp1-22/+0
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-11rootless: Remove ROOTLESS_WORKAROUNDJeremy Huddleston1-5/+1
This was already removed for XWin (20701522be803fe47e921fcf059dadf64c7f287d) with no reported side effects. XQuartz seems to be behaving ok without it as well. While this possibly brings back bug #1168, we don't have any reproduction steps for that issue, and if it crops up again, we should fix it a real way rather than this hokey workaround which doesn't even work for COMPOSITE. This effectively reverts the following two changes: b2135e589baeb2ea26da50b9167feaea23bcce3c d7fef52254126aa5897a5c58faeda1f61d5b13d8 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-08-12XQuartz: Make application switching work better for the no-spaces caseJeremy Huddleston2-5/+11
We still have the issue with not raising the frontmost window for the case when spaces is enabled, and the AppleSpacesSwitchOnActivate preference is disabled. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-08-10rootless: fix uninitialized private key assert in non-rootless modes in Cygwin/XJon TURNEY1-0/+3
IsFramedWindow() is called from miPaintWindow() if the server has been built with ROOTLESS defined, irrespective of if RootlessInit() has ever been called, or not. Add a check to IsFramedWindow() to check if rootlessWindowPrivateKey has been registered (as a proxy for checking if the rootless extension has been initialized) so we don't go on to try to use that key, triggering an assert. This bug exposes what appears to be a difference in opinion about the rootless extension between XQuartz and XWin. XQuartz always initializes the rootless extension, whereas XWin offers several modes of operation, and the rootless extension is only used for one of them That probably means that the all code under compile time guard for ROOTLESS should be carefully checked that it doesn't also need to be under a run-time guard (I've reviewed the other ROOTLESS blocks in dix/events.c and dix/window.c and they look ok -- keithp) 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-07-19rootless: Adjust the frame size of the native root window in ↵Jan Hauffa1-0/+7
RootlessResizeWindow If the native root window isn't resized as well, we will likely crash the next time we draw to the root. On OS X, this can be seen by: 1) Put the display preferences in the menu bar and set X11's preferences so you can access the menu bar in fullscreen mode 2) Set the resolution of your screen lower than normal. 3) Start X11 in fullscreen mode. The root window will cover the screen as expected. 4) Use the menu bar to increase the resolution of the display. The root window will now cover the old area and not the full screen, but 'xwininfo -root' will report the full width. 5) Run 'xsetroot -solid red', and we have the crash you mention above. Leaving/entering fullscreen after #4 will fix the problem. This is because the WINREC is erased when we leave fullscreen mode and it is recreated upon re-entry: RootlessUpdateRooted(FALSE) RootlessDisableRoot(screenInfo.screens[0]) RootlessDestroyFrame (pRoot, winRec); RootlessUpdateRooted(TRUE) RootlessEnableRoot(screenInfo.screens[0]) RootlessEnsureFrame(screenInfo.screens[0]->pRoot) creates a new WINREC... Signed-off-by: Jan Hauffa <hauffa@in.tum.de> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Acked-By: Jon TURNEY <jon.turney@dronecode.org.uk> Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-06-10Fix a couple more possible errors with input-only windowsKeith Packard1-2/+2
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-10Remove unnecessary parentheses around return values in functionsMikhail Gusarov1-1/+1
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-06Replace deprecated bzero with memsetMikhail Gusarov1-1/+1
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 Sharp4-30/+14
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-06-05Damage pixmap private key was being mis-registered as a picture keyKeith Packard1-1/+1
This would cause all kinds of fun, in particular Xnest would crash at startup. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-05Move the shadow screen private key initialization to shadowSetupKeith Packard1-3/+3
Some users of the shadow code don't call shadowInit, just shadowSetup and so make sure the key is initialized there. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-05Change the devPrivates API to require dixRegisterPrivateKeyKeith Packard6-44/+71
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-05Rename region macros to eliminate screen argumentKeith Packard13-192/+192
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-05rootless: Fix SetShape regressionJeremy Huddleston2-3/+3
This fixes a regression in miext/rootless from 643cb6e87c10ab554c03ada81930001a8ebcc909 Found-by: tinderbox Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-03Move each screen's x/y origin into ScreenRec.Jamey Sharp1-4/+4
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-03Move each screen's root-window pointer into ScreenRec.Jamey Sharp4-11/+15
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-05-13Define GCAllBits as the union of all valid CreateGC masks.Jamey Sharp1-1/+1
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-05-13Replace dixChangeGC with calls directly to the right variant.Jamey Sharp1-4/+4
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-05-13dixChangeGC callers: Use ChangeGCVal instead of XID almost everywhere.Jamey Sharp1-8/+8
The exceptions are ProcChangeGC and CreateGC. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-05-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov7-26/+26
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-02rootless: Remove an unneeded commentJeremy Huddleston1-4/+0
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-19unifdef -B -DRENDER to always include RENDER codeKeith Packard8-38/+0
This patch was created with: git ls-files '*.[ch]' | while read f; do unifdef -B -DRENDER -o $f $f; done Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-17os: Prevent core dump from being truncated.Rami Ylimaki2-6/+6
The problem fixed by this patch can be reproduced on Linux with the following steps. - Access NULL pointer intentionally in ProcessOtherEvent on key press. - Instead of saving core dump to a file, write it into a pipe. echo "|/usr/sbin/my-core-dumper" > /proc/sys/kernel/core_pattern - Dump the core by pressing a key. While the core is being dumped into the pipe, the smart schedule timer will cause a pending SIGALRM. Linux kernel stops writing data to the pipe when there are pending signals. This causes the core dump to be truncated. On my system I'm expecting a 6 MB dump but the size will be 60 kB instead. The problem is solved if we block the SIGALRM caused by expired smart schedule timer. I haven't been able to reproduce this problem in the following cases. - Save core dump to a file instead of a pipe. - kill -SEGV `pidof Xorg` - Press a key to dump core while gdb is attached to Xorg. - Give option -dumbSched to Xorg. Also note that the fix works only when NoTrapSignals has the default value FALSE. The problem can still be reproduced if error signals aren't trapped. In addition to pending SIGALRM, there is a similar problem with pending SIGIO from the keyboard driver during core dump. Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-08Miscellaneous compilation warning fixesJeremy Huddleston1-1/+1
main.c:134: warning: no previous prototype for 'dix_main' rootlessScreen.c: In function 'RootlessMarkOverlappedWindows': rootlessScreen.c:434: warning: function declaration isn't a prototype backtrace.c:51: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'int' backtrace.c:54: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'int' set.c: In function 'RecordSetMemoryRequirements': set.c:413: warning: old-style function definition set.c: In function 'RecordCreateSet': set.c:425: warning: old-style function definition stub.c: In function ‘main’: stub.c:236: warning: ISO C90 forbids mixed declarations and code Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-10-13Rootless: src drawable window can now be NULLJeremy Huddleston1-2/+2
Fix a possible crash when pSrc->pDrawable is NULL. Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-10-13Rootless: Abstract some of the Xplugin specific stuff which has crept into ↵Jeremy Huddleston5-68/+26
rootlessWindow.c The rootless extension now directly calls some Xplugin functions, and relies on types defined in Xplugin.h, which isn't very abstracted :-) This patch is a start at abstracting some of the Xplugin specific stuff which has crept into rootlessWindow.c. This has been done in a pretty mindless fashion, without much thought as to if the additions to the generic rootless interface are the correct ones There is some confusion as to if RootlesscolormapCallback() returns a Bool or xp_error_enum value (not so abstact), but I have no way of checking, of finding out if Xplugin actually checks the result :-) Based on patches from Colin Harrison, Jon Turney and Yaakov Selkowitz Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-09-27Rootless: Correct border rendering on parent-relative windowsJeremy Huddleston1-0/+26
Resurected code from the punted RootlessPaintBackground/Border and added it conditionally to miPaintWindow (cherry picked from commit cf2e3312cff3f341e9edba8c321a4ca7ffd8748e)
2009-07-29Cygwin/X: Only try to build rootless extension if multiwindow extwm mode is ↵Jon TURNEY1-1/+1
being built Rootless extension still needs a bit more work to build successfully for Cygwin/X
2009-07-24Damage: Add devPrivates to DamageRecAaron Plattner2-0/+4
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2009-07-24Damage: Add wrappable hooks for damage create, destroy, register, & unregister.Aaron Plattner3-2/+83
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2009-06-29Cygwin/X: Fix multiwindow extwm mode to build againJon TURNEY1-0/+3
Build and link with rootless extension Update Xwin code for removal of RootlessAccelInit() Fix Xwin code which now has a collision with the type name EventType Based on patches from Colin Harrison, Jon Turney and Yaakov Selkowitz Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>