Commit Graph

24 Commits

Author SHA1 Message Date
Alan Coopersmith 23e83724df Fix spelling/wording issues
Most (but not all) of these were found by using
  codespell --builtin clear,rare,usage,informal,code,names
but not everything reported by that was fixed.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-07-05 13:07:33 -07:00
Alan Coopersmith 0018784cdd Convert hw/dmx to new *allocarray functions
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21 16:58:08 -07:00
Alan Coopersmith 0fbebad724 dmx: remove unused variables
Gets rid of gcc 4.8 warnings:

dmxscrinit.c: In function ‘dmxBEScreenInit’:
dmxscrinit.c:83:15: warning: unused variable ‘gcvals’ [-Wunused-variable]
     XGCValues gcvals;
               ^

dmxwindow.c: In function ‘dmxResizeWindow’:
dmxwindow.c:860:19: warning: variable ‘pSibPriv’ set but not used [-Wunused-but-set-variable]
     dmxWinPrivPtr pSibPriv;
                   ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
2015-02-10 18:14:44 -08:00
Adam Jackson 0d30d44a8c dix: Drop the third argument from WindowExposuresProcPtr
A careful read shows that it was always NULL.  It hasn't always been; as
the DDX spec indicates, it was the "occluded region that has backing
store", but since that backing store code is long gone, we can nuke it.

mi{,Overlay}WindowExposures get slightly simpler here, and will get even
simpler in just a moment.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 11:14:44 +02: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
Yaakov Selkowitz ea1d76d1b6 Fix formatting of address operators
The formatter confused address operators preceded by casts with
bitwise-and expressions, placing spaces on either side of both.
That syntax isn't used by ordinary address operators, however,
so fix them for consistency.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-12-05 18:09:48 -06: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
Gaetan Nadon 9129beb507 dmx: fix warning for doxygen explicit links
Explicit links to functions in another file are not supported.

Reviewed-by Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-05-13 14:08:09 -07:00
Cyril Brulebois ffb93533fd Replace LookupIDByType() with dixLookupResourceByType(), take 1.
This patch has been prepared with the following Coccinelle semantic patch:

@@
expression x, y;
type t;
identifier r;
@@
-r = (t) LookupIDByType(x, y);
+dixLookupResourceByType((pointer*)&r, x, y, NullClient, DixUnknownAccess);

@@
expression x, y;
type t;
identifier r;
@@
-t r = (t) LookupIDByType(x, y);
+t r;
+dixLookupResourceByType((pointer*)&r, x, y, NullClient, DixUnknownAccess);

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-07 18:42:44 +01: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
Pierre-Loup A. Griffais 643cb6e87c Only deal with input code when changing the input shape.
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-06-02 21:11:31 -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
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
Lee Leahu f713f447a2 dmxDestroyWindow() - must call the X's native DetroyWindow()
Don't really know why this section was disabled, but without it,
certain pPicture resources do not get free'd until later in the
FreeClientResources() process after the screen has been free'd -
resulting in seg fault.

With this patch, all resources normally free'd using vanilla X are
now also being freed correctly by Xdmx.

https://bugs.freedesktop.org/show_bug.cgi?id=24576

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-10-20 13:32:21 +10:00
Peter Hutterer 010d5e2865 dmx: remove doxygen-generated files.
These can be recreated by simply running 'doxygen doxygen.conf' in
hw/dmx/doc. Some of the files do not exist anymore, these have been removed.
Some other files have a different naming scheme.
Doxygen warnings about missing links fixed, two warnings remain:

/home/whot/xorg/xserver/hw/dmx/dmxwindow.c:142: Warning: explicit link
request to 'dmxConfigureRootWindow' could not be resolved
/home/whot/xorg/xserver/hw/dmx/dmxwindow.c:119: Warning: explicit link
request to 'dmxConfigureScreenWindow()' could not be resolved

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-10-20 13:32:16 +10:00
Adam Jackson d6228cb22a Shape extension is built-in and mandatory. 2008-07-24 15:46:08 -04:00
Eamon Walsh 97c150b61b Merge branch 'master' into XACE-SELINUX
Conflicts:

	afb/afbpntwin.c
	afb/afbscrinit.c
	afb/afbwindow.c
	cfb/cfb.h
	cfb/cfballpriv.c
	cfb/cfbscrinit.c
	cfb/cfbwindow.c
	configure.ac
	fb/wfbrename.h
	hw/xfree86/xf4bpp/ppcIO.c
	hw/xfree86/xf4bpp/ppcPntWin.c
	hw/xfree86/xf4bpp/ppcWindow.c
	hw/xfree86/xf8_32bpp/cfbscrinit.c
	mfb/mfb.h
	mfb/mfbpntwin.c
	mfb/mfbscrinit.c
	mfb/mfbwindow.c
	mi/miexpose.c

Note: conflicts caused by devPrivates rework vs. paintwindow changes.
2007-09-19 07:25:55 -04:00
Eric Anholt e4d11e58ce Remove the PaintWindow optimization.
This was an attempt to avoid scratch gc creation and validation for paintwin
because that was expensive.  This is not the case in current servers, and the
danger of failure to implement it correctly (as seen in all previous
implementations) is high enough to justify removing it.  No performance
difference detected with x11perf -create -move -resize -circulate on Xvfb.
Leave the screen hooks for PaintWindow* in for now to avoid ABI change.
2007-09-13 00:08:53 +00:00
Eamon Walsh 4017d31902 devPrivates rework: since API is already broken, switch everything
over to new system.

Need to update documentation and address some remaining vestiges of
old system such as CursorRec structure, fb "offman" structure, and
FontRec privates.
2007-08-28 09:28:25 -04:00
Adam Jackson 4d76075dbb Death to RCS tags. 2007-06-29 14:06:52 -04:00
Kevin E Martin e348ac4b4d Prepare Xdmx and Xvfb for modularization by adding appropriate #include
<{dix,dmx}-config.h> to the source files.
2005-07-12 00:52:48 +00:00
Kevin E Martin 25bd6ff4a6 Add new extension enable/disable feature. This code is a small step in the
right direction -- i.e., moving towards full run-time config of
    extensions. Currently, only XTEST, XINERAMA, RENDER, XKB, and XEVIE are
    supported.
2004-07-31 04:23:21 +00:00
Kevin E Martin 7976ee51af Add Distributed Multihead X (DMX) support 2004-06-30 20:06:56 +00:00