Commit Graph

48 Commits

Author SHA1 Message Date
Daniel Stone e957a2e5dd dix: Add hybrid full-size/empty-clip mode to SetRootClip
216bdbc735 removed the SetRootClip call in the XWayland output-hotplug
handler when running rootless (e.g. as a part of Weston/Mutter), since
the root window has no storage, so generating exposures will result in
writes to invalid memory.

Unfortunately, preventing the segfault also breaks sprite confinement.
SetRootClip updates winSize and borderSize for the root window, which
when combined with RRScreenSizeChanged calling ScreenRestructured,
generates a new sprite-confinment area to update it to the whole screen.

Removing this call results in the window geometry being reported
correctly, but winSize/borderSize never changing from their values at
startup, i.e. out of sync with the root window geometry / screen
information in the connection info / XRandR.

This patch introduces a hybrid mode, where we update winSize and
borderSize for the root window, enabling sprite confinement to work
correctly, but keep the clip emptied so exposures are never generated.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Tested-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-02-22 13:26:31 -05:00
Michael Stapelberg a6cddb8c04 Also dump passive grabs on XF86LogGrabInfo
Signed-off-by: Michael Stapelberg <stapelberg@google.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-11-10 15:12:21 +10:00
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
Peter Harris 5eb77697ea Avoid starting a comment with */*
Even though -Wcomment doesn't mind it (in gcc or clang), the appearance
of */* confuses the syntax highlighter of some editors (eg. vim), and
causes warnings in MSVC.

Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-17 10:19:52 -07: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 ad0156c369 dix: Remove MapUnmapEventsEnabled and friends
This hack was added to suppress events generated by Composite's internal
unmap/map cycle on redirection state change.  Since that cycle was
removed in 193ecc8b4, these can go.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Ville Syrjälä <syrjala@sci.fi>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-09-23 10:41:54 -07:00
Daniel Stone a1d41e311c Move extension initialisation prototypes into extinit.h
Create extinit.h (and xf86Extensions.h, for Xorg-specific extensions) to
hold all our extension initialisation prototypes, rather than
duplicating them everywhere.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09 23:06:41 -07:00
Dave Airlie 957bf959fb dix/render: consolidate window format matching code.
This code existed in 3 different forms, perhaps it should be
consolidated.

Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-06-28 10:43:35 -07: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
Daniel Stone ddf735fd4e DIX: Make PrintWindowTree actually useful
Rewrite PrintWindowTree to make it actually tell you what you want to
know.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-07-01 08:46:15 +10:00
Dave Airlie eb9266c717 consolidate SetRootClip (v2)
each DDX has its own copy, I've taken the darwin one,
though I'm not sure why it needs the pOldClip piece that nobody
else has and the commit msg is like an "Updates from magic land"
type message.

This removes the main uses of pWin->winSize from the DDXen.

v2: drop old clip like ajax suggests.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-03-28 10:06:32 +10:00
Adam Jackson e45a8a498d Remove CreateUnclippedWinSize from window.h
This is utterly wrong, but then, so is sdksyms.sh
2009-01-20 22:07:07 -05:00
Adam Jackson 20d2117eb8 Move CreateUnclippedWinSize to mbuf
It's the only user, so.
2009-01-20 00:18:02 -05:00
Paulo Cesar Pereira de Andrade b1dac41fb3 Use libtool convenience libraries and better "symbol" table.
All .a libraries were converted to .la, and instead of linking the
Xorg binary with a mix of .a and .la, and adding some libraries more
then once in the command line, etc, now it generates a single libxorg.la
from all the required convenience libraries, and links with a dummy
xorg.c (that should usually be the file with the main function...).
This removes the requirement of some things like libosandcommon and
libinit, that existed to circumvent problems when linking multiple
.a and .la in the final Xorg binary.

  The "symbol table" is now generated dynamically, by a shell script,
with an embedded gawk parser that parses cpp output. The new file
sdksyms.sh is generated by hand by analyzing all Makefile.am's and
making it create a sdksyms.c file, that includes all sdk headers that
will add symbols for the Xorg binary. Module headers aren't read, and
a in 2 files it was required to add a "<hash>ifndef XorgLoader" around
declarations shared between the Xorg binary and libextmod. A few
other changes were added to other sdk headers, like preventing
multiple inclusion, or including other headers to satisfy dependencies.

  This should be a lot more portable, and better (hopefully properly)
using libtool to generate convenience libraries.
2008-12-07 02:22:19 -02:00
Paulo Cesar Pereira de Andrade 49f77fff14 Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.

  This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)

  LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.

  xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
Peter Hutterer 89add4ee98 dix: remove obsolete InitWindowPrivates(). 2008-04-25 14:30:26 +09:30
Peter Hutterer 8da83836b6 Merge branch 'master' into mpx
Conflicts:

	XTrap/xtrapddmi.c
	Xext/security.c
	Xext/xprint.c
	Xext/xtest.c
	Xext/xvdisp.c
	Xi/exevents.c
	Xi/grabdevb.c
	Xi/grabdevk.c
	Xi/opendev.c
	Xi/ungrdev.c
	Xi/ungrdevb.c
	Xi/ungrdevk.c
	dix/cursor.c
	dix/devices.c
	dix/dixutils.c
	dix/events.c
	dix/getevents.c
	dix/main.c
	dix/window.c
	hw/xfree86/ramdac/xf86Cursor.c
	include/dix.h
	include/input.h
	include/inputstr.h
	mi/midispcur.c
	mi/miinitext.c
	mi/misprite.c
	render/animcur.c
	xfixes/cursor.c
	xkb/xkbAccessX.c
2008-01-03 17:04:54 +10:30
Eamon Walsh c8feb73f58 Merge branch 'master' into XACE-SELINUX
Conflicts:

	Xext/EVI.c
	Xext/bigreq.c
	Xext/cup.c
	Xext/dpms.c
	Xext/fontcache.c
	Xext/mitmisc.c
	Xext/xcmisc.c
	Xext/xf86bigfont.c
	Xext/xtest.c
	configure.ac
	dbe/dbe.c
	hw/darwin/darwin.h
	hw/darwin/darwinEvents.c
	hw/darwin/iokit/xfIOKit.h
	hw/darwin/iokit/xfIOKitCursor.c
	hw/darwin/quartz/fullscreen/fullscreen.c
	hw/darwin/quartz/fullscreen/quartzCursor.c
	hw/darwin/quartz/quartz.c
	hw/darwin/quartz/quartzCommon.h
	hw/darwin/quartz/quartzCursor.c
	hw/darwin/quartz/xpr/dri.c
	hw/darwin/quartz/xpr/dristruct.h
	hw/darwin/quartz/xpr/xprCursor.c
	hw/darwin/quartz/xpr/xprFrame.c
	hw/xfree86/modes/xf86RandR12.c
	include/cursor.h
	miext/rootless/rootlessCommon.h
	miext/rootless/rootlessScreen.c
	miext/rootless/rootlessWindow.c
	render/picturestr.h

Trying to pick up the pieces from the darwin churn here...
2007-12-13 18:38:25 -05:00
Jeremy Huddleston 0ad1c359c5 Darwin: Use __APPLE__ instead of __DARWIN__
(cherry picked from commit 54654815fa)
2007-12-07 18:54:58 -08:00
Eamon Walsh 60be452c2e xace: restore the old SaveScreens function and introduce new API, since the
old version is called from drivers...
2007-11-19 16:59:34 -05: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
Eamon Walsh b82557c9fb xace: add hooks + new access codes: core protocol screensaver requests 2007-08-16 10:36:05 -04:00
Eamon Walsh 2763056ab5 xace: add hooks + new access codes: core protocol window requests 2007-08-13 13:44:33 -04:00
Peter Hutterer f367285fd5 Merge branch 'master' into mpx
Conflicts:

	Xi/exevents.c
	dix/devices.c
	dix/getevents.c
	include/dix.h
	mi/mieq.c
2007-08-12 15:31:10 +09:30
Adam Jackson 4d76075dbb Death to RCS tags. 2007-06-29 14:06:52 -04:00
Peter Hutterer e7b47b1758 Change core enter/leave semantics for multiple pointers.
Send EnterNotify when first device enters the window, LeaveNotify when the
last device leaves the window. Additional devices will not cause additional
Enter/LeaveNotifies.
2007-04-12 16:24:42 +09:30
Peter Hutterer e8777a91f3 Merge branch 'master' into mpx
Conflicts:

	Xi/closedev.c
	Xi/exevents.c
	Xi/extinit.c
	Xi/listdev.c
	dix/window.c
	hw/xfree86/common/xf86Xinput.c
	include/extinit.h
	mi/mipointer.c
2007-04-02 15:36:26 +09:30
Adam Jackson 4b5802ddbd General DIX static and dead code cleanup. 2007-03-25 17:57:54 -04:00
Peter Hutterer 95e1a88050 Xi: Adding ChangeDeviceCursor request 2007-01-08 12:31:18 +10:30
Adam Jackson 0aaac95b0d Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
Greg Kroah-Hartman 96c19a3ec1 put function prototype for ShapeExtensionInit() in proper place
based on FIXME in mi/miinitext.c
2006-06-09 09:51:28 -07:00
Deron Johnson e31e8ace10 Fix composite overlay window bug 6411 2006-03-29 17:51:54 +00:00
Søren Sandmann Pedersen c2dedf4d17 Thu Jan 12 17:09:18 2006 Søren Sandmann <sandmann@redhat.com>
Add new functions to enable and disable events on Map and Unmap.
Use them here to make sure Composite redirect doesn't cause Map/UnmapNotify
    events that would confuse window managers.
2006-01-12 22:14:56 +00:00
Daniel Stone 825a95a1fa Remove use of dix-config and xorg-config.h from public headers. 2005-08-24 11:18:35 +00:00
Daniel Stone 0bb669638f Change <X11/misc.h> and <X11/os.h> to "misc.h" and "os.h". 2005-07-03 08:53:54 +00:00
Daniel Stone e03198972c Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.
Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings.
Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all
    source files in the xserver/xorg tree, predicated on defines of
    HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to
    <X11/fonts/foo.h>.
2005-07-03 07:02:09 +00:00
Daniel Stone 9b1debcdb6 Change all misc.h and os.h references to <X11/foo.h>. 2005-07-01 22:43:43 +00:00
Daniel Stone 292c4cff26 Fix includes right throughout the Xserver tree:
change "foo.h" to <X11/foo.h> for core headers, e.g. X.h, Xpoll.h;
change "foo.h", "extensions/foo.h" and "X11/foo.h" to
    <X11/extensions/foo.h> for extension headers, e.g. Xv.h;
change "foo.[ch]" to <X11/Xtrans/foo.[ch]> for Xtrans files.
2005-04-20 12:25:48 +00:00
Kevin E Martin 813d75f9d3 Use LibraryTargetName when not building a loadable server
Move extern function declarations to window.h
Cleaned up code since client's saveSet is no longer defined as a pointer*
Added externs back in
Change #if to #ifdef to fix compiler warning
Add function declarations that were inadvertently removed by previous check
    in
Disable extensions that are not (yet) supported by DMX
2004-07-29 23:43:40 +00:00
Stuart Kreitman e1281790bb Integration of DAMAGE-XFIXES branch to trunk
https://freedesktop.org/bugzilla/show_bug.cgi?id=859
Modified Files: cursorstr.h dix.h dixstruct.h regionstr.h window.h
2004-07-29 18:16:56 +00:00
Egbert Eich 2fb5886200 Merging XORG-CURRENT into trunk 2004-04-23 19:54:30 +00:00
Egbert Eich dae90c3af9 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 2004-03-14 08:34:49 +00:00
Egbert Eich 867451f1ab Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 2004-03-03 12:12:50 +00:00
Egbert Eich df0313d35b readding XFree86's cvs IDs 2004-02-26 13:36:15 +00:00
Egbert Eich 147aae87fd Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 2004-02-26 09:23:53 +00:00
Kaleb Keithley adc7f9a4eb XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks 2003-11-25 19:29:01 +00:00
Kaleb Keithley d568221710 XFree86 4.3.0.1 2003-11-14 16:49:22 +00:00
Kaleb Keithley ded6147bfb R6.6 is the Xorg base-line 2003-11-14 15:54:54 +00:00