Commit Graph

233 Commits

Author SHA1 Message Date
Keith Packard
9838b7032e Introduce a consistent coding style
This is strictly the application of the script 'x-indent-all.sh'
from util/modular. Compared to the patch that Daniel posted in
January, I've added a few indent flags:

	-bap
	-psl
	-T PrivatePtr
	-T pmWait
	-T _XFUNCPROTOBEGIN
	-T _XFUNCPROTOEND
	-T _X_EXPORT

The typedefs were needed to make the output of sdksyms.sh match the
previous output, otherwise, the code is formatted badly enough that
sdksyms.sh generates incorrect output.

The generated code was compared with the previous version and found to
be essentially identical -- "assert" line numbers and BUILD_TIME were
the only differences found.

The comparison was done with this script:

dir1=$1
dir2=$2

for dir in $dir1 $dir2; do
	(cd $dir && find . -name '*.o' | while read file; do
		dir=`dirname $file`
		base=`basename $file .o`
		dump=$dir/$base.dump
		objdump -d $file > $dump
	done)
done

find $dir1 -name '*.dump' | while read dump; do
	otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
	diff -u $dump $otherdump
done

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-21 13:54:42 -07:00
dtakahashi42
328074890e rootless: Fix a server crash when choosing a color with the gimp color wheel
https://trac.macports.org/ticket/30927

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-18 11:30:22 -08:00
Keith Packard
d4096abb59 Merge remote-tracking branch 'whot/for-keith' 2011-07-01 15:45:45 -07:00
Matěj Cepl
b27d61e443 Fix UTF-8 encoding
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-30 16:38:31 +10:00
Cyril Brulebois
f41ac25d93 miext: Mark some variables as unused.
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-06-16 00:43:56 +02:00
Jeremy Huddleston
4944de2484 rootless: Fix a typo in RootlessGlyphs which resulted in a garbage value
Found by clang static analyzer

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:01 -07:00
Jeremy Huddleston
2098cb03c6 rootless: Dead code removal
Found by clang static analyzer

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:01 -07:00
Erkki Seppälä
e409fb32b9 damage: use DamageReportDamage for the initial borderClip damage report
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-04-13 18:59:09 -07:00
Søren Sandmann Pedersen
d7f8011418 Remove TriStrip and TriFan from the picture screen
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-03-14 14:09:07 -04:00
Jeremy Huddleston
de32d4dcf5 Revert "rootless: Remove ROOTLESS_WORKAROUND"
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 c89f052104.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-02-27 16:19:46 -08:00
Adam Jackson
93cd4b1034 shadow: Remove hw/xfree86/ from includes
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-02-08 12:41:32 -05:00
Adam Jackson
0c230728f3 rootless: Remove hw/xfree86/ from includes
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-02-08 12:41:25 -05:00
Adam Jackson
505defd270 damage: Remove hw/xfree86/ from includes
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-02-08 12:41:20 -05:00
Ville Syrjälä
0998574699 Call SourceValidate even if src == dst
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-05 11:56:42 -08:00
Ville Syrjälä
e41e907b3c Add subWindowMode parameter to SourceValidate
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>
2011-01-05 11:56:28 -08:00
Daniel Stone
469d5bf8b7 mi: Sync: Don't free managed screen private
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-27 09:43:56 -08:00
James Jones
1c4a0db2c6 Add fence sync driver interface
-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-06 19:15:26 -08:00
James Jones
af0f9f9133 Move some sync code to miext
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-06 19:12:46 -08:00
Adam Jackson
c4c4676e68 dix: Remove the backing store leftovers
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:46:08 -05:00
Keith Packard
4ed4915bc0 Merge remote branch 'whot/for-keith' 2010-11-10 16:58:21 -08:00
Adam Jackson
f0b4df9948 shadow: Optimize shadowUpdatePacked(). (#26973)
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-10 16:17:24 -08:00
Cyril Brulebois
b142b0d274 Remove more superfluous if(p!=NULL) checks around free(p).
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-11 08:29:54 +10:00
Cyril Brulebois
99275ad2fa Remove superfluous if(p!=NULL) checks around free(p); p=NULL;
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-11-11 08:22:59 +10:00
Jamey Sharp
2079853632 rootless: Delete dead remnants of rootless acceleration.
Jeremy deleted rootlessAccelInit's implementation in 2008 in commit
587c010a1c. 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-13 15:58:08 -07:00
Jamey Sharp
58d1ec0fe8 rootless: ROOTLESS_GLOBAL_COORDS is always set, so unifdef it.
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-13 15:58:08 -07:00
Jamey Sharp
35ce892a70 rootless: ROOTLESS_TRACK_DAMAGE is never set, so unifdef it.
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-13 15:58:08 -07:00
Jamey Sharp
bbbf795e6b Delete redundant GC initializations.
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-13 15:55:17 -07:00
Jamey Sharp
b218402436 Delete unused devPrivate field from GCFuncs and GCOps.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-13 15:55:17 -07:00
Jamey Sharp
139aa6e742 damage: Delete NOTUSED block--it was never not NOTUSED.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-09-13 15:55:16 -07:00
Jeremy Huddleston
4e09a69c5b rootless: Remove ROOTLESS_WORKAROUND
This was already removed for XWin (20701522be)
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:
b2135e589b
d7fef52254

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-09-11 14:14:43 -07:00
Jeremy Huddleston
4fc4cab98d XQuartz: Make application switching work better for the no-spaces case
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-12 20:26:36 -10:00
Jon TURNEY
70a94c5b7a rootless: fix uninitialized private key assert in non-rootless modes in Cygwin/X
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-08-10 09:13:30 -07:00
Jan Hauffa
95756f410c rootless: Adjust the frame size of the native root window in 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-07-19 19:11:26 -07:00
Keith Packard
a8ec9eca85 Fix a couple more possible errors with input-only windows
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-10 19:15:28 -07:00
Mikhail Gusarov
7287ef9e6c Remove unnecessary parentheses around return values in functions
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-10 06:42:42 -07:00
Mikhail Gusarov
5a0fc0ad21 Replace deprecated bzero with memset
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-06 15:07:27 +07:00
Jamey Sharp
a0fe6987b5 Clean up after removal of screen parameters from region macros.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-06-05 22:07:21 -07:00
Keith Packard
424b593c78 Damage pixmap private key was being mis-registered as a picture key
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-05 21:34:51 -07:00
Keith Packard
e7fc8b32e4 Move the shadow screen private key initialization to shadowSetup
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-05 21:12:41 -07:00
Keith Packard
faeebead7b Change the devPrivates API to require dixRegisterPrivateKey
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-05 19:23:03 -07:00
Keith Packard
2dc138922b Rename region macros to eliminate screen argument
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-05 18:59:00 -07:00
Jeremy Huddleston
1768e51976 rootless: Fix SetShape regression
This fixes a regression in miext/rootless from 643cb6e87c

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-05 17:13:34 -07:00
Jamey Sharp
a83cff9f4d Move each screen's x/y origin into ScreenRec.
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-03 14:03:23 -07:00
Jamey Sharp
e7fae9ecc4 Move each screen's root-window pointer into ScreenRec.
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-03 14:03:23 -07:00
Jamey Sharp
5193f25ea3 Define GCAllBits as the union of all valid CreateGC masks.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-05-13 17:14:07 -07:00
Jamey Sharp
6a84cd9434 Replace dixChangeGC with calls directly to the right variant.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-05-13 17:14:07 -07:00
Jamey Sharp
e2929db7b7 dixChangeGC callers: Use ChangeGCVal instead of XID almost everywhere.
The exceptions are ProcChangeGC and CreateGC.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-05-13 17:13:48 -07:00
Mikhail Gusarov
3f3ff971ec Replace X-allocation functions with their C89 counterparts
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-13 00:22:37 +07:00
Jeremy Huddleston
4d3789c9b3 rootless: Remove an unneeded comment
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-05-02 15:27:29 -07:00
Keith Packard
28b7b2b8d0 unifdef -B -DRENDER to always include RENDER code
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-04-19 09:26:10 -07:00