Commit Graph

12 Commits

Author SHA1 Message Date
Peter Hutterer 732fd7e571 Drop trailing whitespaces
sed -i "s/[ ]\+$//g" **/*.(c|h)

happy reviewing...
git diff -w is an empty diff.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12 10:25:00 +10:00
Keith Packard 60014a4a98 Replace 'pointer' type with 'void *'
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer'
is used throughout the X server for other things, and having duplicate
names generates compiler warnings.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-12 10:24:11 -08:00
Adam Jackson 1dd839a425 composite: Fix COW creation for Xinerama (v2)
Say you have two 800x600 screens left/right of each other.  A window
that's 200x200 at +700+0 in protocol coordinate space will appear to be
at -100+0 in the coordinate space of the right hand screen.  Put another
way: windows are in the coordinate space of their root window pixmap.

We weren't doing this translation for the COW, so when rendering came in
to it you'd see the top-left chunk of the COW on all screens.  Cool
effect and all, but wrong.

v2: Only translate when Xinerama is active [keithp]

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-12-09 13:20:36 -05:00
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
Alan Coopersmith 2db6951763 Sun's copyrights now belong to Oracle
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
David Reveman 84a14fab8f composite: add panoramix support
Taken from:
50d2d8c896
dbffd0d44a
9b5b102163
75f9b98af3
07fba8b1f7

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-30 13:47:42 -05: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
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
Alan Coopersmith c9726bbe31 Update Sun license notices to current X.Org standard form
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-16 17:11:35 -08:00
Alan Coopersmith 8609a4e883 Correct some Sun license notices to Sun's standard X11 license format
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-05-15 11:24:15 -07:00
Havoc Pennington 1731882341 Set bg pixmap of composite overlay window to None (#20912)
Otherwise it's impossible to get the COW without a white
flash on the screen, because it's on top, mapped immediately,
and unaffected by composite redirection. This makes
initial login ugly when it doesn't need to be.
2009-04-03 11:23:28 -04:00
Keith Packard efa65a0317 Rework composite overlay window code to fix several resource management bugs.
The composite overlay window code had several misunderstandings of the
workings of the X server, in particular error handling paths would often
double-free objects. Clean all of this up by using resource destruction as
the sole mechanism for freeing resource-based objects.
2008-05-04 21:54:27 -07:00