summaryrefslogtreecommitdiff
path: root/miext
AgeCommit message (Collapse)AuthorFilesLines
2011-11-18rootless: Fix a server crash when choosing a color with the gimp color wheeldtakahashi421-2/+2
https://trac.macports.org/ticket/30927 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-07-01Merge remote-tracking branch 'whot/for-keith'Keith Packard1-1/+1
2011-06-30Fix UTF-8 encodingMatěj Cepl1-1/+1
Report to find out all non-UTF-8 files created by cat extensions |xargs -I XXXX find . -name \*.XXXX |while read FILE ; do if ( iconv -f utf8 -t ucs2 $FILE >/dev/null 2>/dev/null ) ; then /bin/true else echo $FILE fi done >>report Signed-off-by: Matěj Cepl <mcepl@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> [Daniel: git am failed for me, so I redid it. The method listed in the commit message also failed, so I just used file/grep/iconv. The results are the same though.] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-06-16miext: Mark some variables as unused.Cyril Brulebois6-6/+6
There's no use for the values set through the various macro calls (fbGetDrawable and fbGetDrawablePixmap), so mark those variables as unused. The following warnings go away accordingly: | CC shpacked.lo | shpacked.c: In function 'shadowUpdatePacked': | shpacked.c:55:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shpacked.c:55:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shplanar8.lo | shplanar8.c: In function 'shadowUpdatePlanar4x8': | shplanar8.c:105:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shplanar8.c:105:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shplanar.lo | shplanar.c: In function 'shadowUpdatePlanar4': | shplanar.c:101:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shplanar.c:101:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_180.lo | In file included from shrot16pack_180.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate16_180': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_270.lo | In file included from shrot16pack_270.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate16_270': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_270YX.lo | In file included from shrot16pack_270YX.c:31:0: | shrotpackYX.h: In function 'shadowUpdateRotate16_270YX': | shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_90.lo | In file included from shrot16pack_90.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate16_90': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_90YX.lo | In file included from shrot16pack_90YX.c:31:0: | shrotpackYX.h: In function 'shadowUpdateRotate16_90YX': | shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack.lo | In file included from shrot16pack.c:30:0: | shrotpack.h: In function 'shadowUpdateRotate16': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot32pack_180.lo | In file included from shrot32pack_180.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate32_180': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot32pack_270.lo | In file included from shrot32pack_270.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate32_270': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot32pack_90.lo | In file included from shrot32pack_90.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate32_90': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot32pack.lo | In file included from shrot32pack.c:30:0: | shrotpack.h: In function 'shadowUpdateRotate32': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot8pack_180.lo | In file included from shrot8pack_180.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate8_180': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot8pack_270.lo | In file included from shrot8pack_270.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate8_270': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot8pack_90.lo | In file included from shrot8pack_90.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate8_90': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot8pack.lo | In file included from shrot8pack.c:30:0: | shrotpack.h: In function 'shadowUpdateRotate8': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrotate.lo | shrotate.c: In function 'shadowUpdateRotatePacked': | shrotate.c:62:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotate.c:62:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shpacked.lo | shpacked.c: In function 'shadowUpdatePacked': | shpacked.c:55:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shpacked.c:55:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shplanar8.lo | shplanar8.c: In function 'shadowUpdatePlanar4x8': | shplanar8.c:105:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shplanar8.c:105:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shplanar.lo | shplanar.c: In function 'shadowUpdatePlanar4': | shplanar.c:101:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shplanar.c:101:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_180.lo | In file included from shrot16pack_180.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate16_180': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_270.lo | In file included from shrot16pack_270.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate16_270': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_270YX.lo | In file included from shrot16pack_270YX.c:31:0: | shrotpackYX.h: In function 'shadowUpdateRotate16_270YX': | shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_90.lo | In file included from shrot16pack_90.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate16_90': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_90YX.lo | In file included from shrot16pack_90YX.c:31:0: | shrotpackYX.h: In function 'shadowUpdateRotate16_90YX': | shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack.lo | In file included from shrot16pack.c:30:0: | shrotpack.h: In function 'shadowUpdateRotate16': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot32pack_180.lo | In file included from shrot32pack_180.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate32_180': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot32pack_270.lo | In file included from shrot32pack_270.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate32_270': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot32pack_90.lo | In file included from shrot32pack_90.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate32_90': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot32pack.lo | In file included from shrot32pack.c:30:0: | shrotpack.h: In function 'shadowUpdateRotate32': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot8pack_180.lo | In file included from shrot8pack_180.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate8_180': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot8pack_270.lo | In file included from shrot8pack_270.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate8_270': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot8pack_90.lo | In file included from shrot8pack_90.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate8_90': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot8pack.lo | In file included from shrot8pack.c:30:0: | shrotpack.h: In function 'shadowUpdateRotate8': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrotate.lo | shrotate.c:62:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotate.c:62:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Cyril Brulebois <kibi@debian.org>
2011-04-25rootless: Fix a typo in RootlessGlyphs which resulted in a garbage valueJeremy Huddleston1-1/+1
Found by clang static analyzer Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25rootless: Dead code removalJeremy Huddleston2-3/+0
Found by clang static analyzer Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-13damage: use DamageReportDamage for the initial borderClip damage reportErkki Seppälä2-50/+55
Instead of using DamageDamageRegion for reporting the first (virtual) damage in ProcDamageCreate that covers the borderClip of the drawable window, use a function DamageReportDamage directly (previously called damageReportDamage). This avoids sending all other damage listeners a full window update when a new damage object is created. As this patch makes DamageReportDamage a public interface, the function has been moved into the part of the file that contains all the other public functions. The function has not been otherwise modified. Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-03-14Remove TriStrip and TriFan from the picture screenSøren Sandmann Pedersen2-66/+0
These functions no longer go through the screen vtable, so remove them and fix up the various wrappers. Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Keith Packard <keithp@keithp.com> Signed-off-by: Soren Sandmann <ssp@redhat.com>
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>