Commit Graph

61 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult 0676cee63a include: dixfontstr.h: drop silent dependency on libxfont2
This header includes libxfont2.h, but the dependency isn't stated anywhere,
causing some drivers to FTBS (when libxont2.h is in non-standard location).

Since this header doesn't seem to need including libxfont2.h at all, just
stop including it, instead of adding yet another dependency to server SDK.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1610>
2024-10-31 15:28:48 +01:00
Enrico Weigelt, metux IT consult 419c6d7881 (submit/unexport-ddx-callbacks) os: rename ddx.h to ddx_priv.h
Make it clear that stuff from this file really isn't supposed to be used
by dynamically loaded modules like drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:22 +02:00
Enrico Weigelt, metux IT consult be817f8247 (submit/unexport-ddx-callbacks) os: unexport ddx callbacks
The DDX callbacks (where core/DIX calls into DDX) aren't supposed to be
called by drivers directly, so unexport them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:22 +02:00
Enrico Weigelt, metux IT consult 11fe7c5654 (submit/miext-extinit) miext: move over extinit_priv.h from include
Since most of the extension init logic (and on/off switches for them)
is driven from miext, this seems the appropriate place for the header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:20 +02:00
Enrico Weigelt, metux IT consult bb44e6fa97 (submit/miext-extinit) glx: unexport noGlxExtension field
This field isn't used by any drivers, and also better belongs into
the corresponding extension instead of OS adaption layer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:20 +02:00
Enrico Weigelt, metux IT consult a9e5fbfbce (submit/xnest-config.h) Xnest: drop obsolete xnest-config.h
This file became pretty no-op, just including dix-config.h.
So we can remove it now and include dix-config.h directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:20 +02:00
Enrico Weigelt, metux IT consult 64cdc862cd (!1654) Xnest: dont link Xlib anymore
Now that we completely ported from Xlib to XCB, we can finally stop
importing Xlib :)

FIN.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult 24e6785080 (!1654) Xnest: replace XConnectionNumber() by xcb_get_file_descriptor()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult 570ccba299 (!1654) Xnest: fetch supported pixmap formats from xcb setup data
There's even no need to keep our own copies, since we can ask XCB's
copy any time.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult efe0a740c1 (!1654) Xnest: fetch allowed screen depths from xcb screen info
There's even no need to keep our own copies, since we can ask XCB's
copy any time.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult 4c6a8be7ea (!1654) Xnest: fetch image metrics from xcb connection setup data
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult 4a4fb2817a (submit/xnest-bool) Xnest: use Xorg's TRUE/FALSE instead of Xlib's True/False
Use Xserver's defines instead of Xlib's ones. The values are the same.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult e5c8b664d3 os: unexport ddx callbacks
The DDX callbacks (where core/DIX calls into DDX) aren't supposed to be
called by drivers directly, so unexport them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1332>
2024-05-08 09:37:35 +02:00
Enrico Weigelt, metux IT consult 33350ef8ff include: move private definitions out of extinit.h
Public server module API shouldn't be clobbered with private definitions,
thus move them out to extinit_priv.h.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1289>
2024-04-30 00:47:38 +00:00
Enrico Weigelt, metux IT consult be4c8444eb os: unexport Os*() functions
These aren't called (and suited for being called) by drivers,
thus drop them from the public module API.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1381>
2024-04-16 14:20:30 +02:00
Enrico Weigelt, metux IT consult 737c316a99 Xnest: canonicalize includes: <X11/Xdefs.h>
For cleaner code, make sure every source needing something from Xdefs.h
does explicitly include it (not relying on indirect including)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1394>
2024-04-15 19:20:39 +00:00
Enrico Weigelt, metux IT consult 27b83c4cd0 dix: unexport AddScreen() and AddGPUScreen()
These aren't used by any drivers/modules, just DDX'es, so no need to export.

Note: tigervnc does use it, but it has it's own DDX, therefore directly
linked in, just like the in-tree DDX'es which doesn't need exporting.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1349>
2024-03-03 23:24:28 +00:00
Alan Coopersmith 4ad21c3247 Add ddxInputThread call from os layer into ddx layer
Allows ddx's to run additional code as necessary to set up the
input thread.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-02-25 15:48:03 +00:00
Adam Jackson a23eba2a91 dix: Merge AbortDDX into ddxGiveUp
These are so close to identical that most DDXes implement one in terms
of the other. All the relevant cases can be distinguished by the error
code, so merge the functions together to make things simpler.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-09-28 16:25:12 -04:00
Adam Jackson 67c303fff3 miinitext: Load GLX on the mi path
Add a stub for Xnest so it continues to link, but otherwise we support
GLX on every server so there's no need to make every DDX add it.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-02-14 17:04:48 -05:00
Keith Packard 55c2e1a3aa xnest: Use SetNotifyFd to receive events
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-07-18 15:25:59 -04:00
Keith Packard 05a793f5b3 dix: Switch to the libXfont2 API (v2)
This new libXfont API eliminates exposing internal X server symbols to
the font library, replacing those with a struct full of the entire API
needed to use that library.

v2: Use libXfont2 instead of libXfont_2

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-07-18 15:25:59 -04:00
Keith Packard f46c487625 hw/xnest: Eliminate shadowed names
Just rename stuff; nothing fancy here.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-22 19:56:32 -08:00
Jeremy Huddleston a818b30598 os: Pass the FatalError message to OsVendorFatalError
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-03-24 01:07:05 -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
Peter Hutterer f51e42f583 Terminate the log with one last message.
Instead of just closing the log when everything is done, put one more
message in stating that we're actually terminating. Users or scripts that
look at the Xorg.log will then know that a) the server has terminated
properly and b) why the server terminated (to some degree, given that most
real-world errors will be caused by AbortServer()).

Acked-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-07-27 09:31:02 +10:00
Peter Hutterer 87d4f90bfc input: free the EQ allocated memory on shutdown (#38634)
mieqFini() already does the right thing, but it needs to be called by the
various DDXs and the XTest Extension.

X.Org Bug 38634 <http://bugs.freedesktop.org/show_bug.cgi?id=38634>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Acked-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-07-01 08:46:28 +10:00
Peter Hutterer 20fb07f436 input: remove DDX event list handling
The current approach to event posting required the DDX to request the event
list (allocated by the DIX) and then pass that list into QueuePointerEvent
and friends.

Remove this step and use the DIX event list directly. This means that
QueuePointerEvent is not reentrant but it wasn't before anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-11 14:27:36 +10:00
Peter Hutterer 8670c46bdf input: replace EventListPtr with InternalEvent array
EventListPtr is a relic from pre-1.6, when we had protocol events in the
event queue and thus events of varying size.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-11 14:27:36 +10:00
Peter Hutterer d33adcdf03 dix: move config_init into the DDX.
The only DDX currently using hotplugging is the xfree86 one and it looks
like it'll stay that way for a bit. Move the initialization to the DDX,
since Xephyr, Xnest, and friends don't need HAL or udev notifications.

Add CloseInput (counterpart to InitInput) to be able to clean up the config
initialization from the DDX as well.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-02-15 09:15:18 +10:00
Peter Hutterer 32ce5c83a5 xnest: use AllocDevicePair for Xnest device initalization
All Xnest needs is a single pointer+keyboard pair. AllocDevicePair sets them
up nicely with the name assigned etc.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-05 10:45:17 +10:00
Julien Cristau 359ed32c9b xnest: only define ddxBeforeReset if needed 2009-01-11 08:54:12 +01:00
Julien Cristau 9651cd8d7a xnest: ANSI cleanups 2009-01-11 08:54:11 +01:00
Adam Jackson bd8bd2c700 Unifdef AIX. 2008-07-23 13:37:42 -04:00
Peter Hutterer c68ca0c7b2 xnest: switch to using EventList rather than xEvents. 2008-06-08 23:28:28 +09:30
Peter Hutterer ba315ae5dd Xi: add XACE hooks for device creation (ChangeDeviceHierarchy)
AddInputDevice checks for permissions already, so all we do is modify a few
callers to let AID sort it out.
2008-01-21 23:44:07 +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 54654815fa5e59b25cfd1fa72610120b72c10175)
2007-12-07 18:54:58 -08:00
Eamon Walsh 27612748e0 Merge branch 'master' into XACE-SELINUX
Conflicts:

	dix/devices.c
2007-09-26 07:47:29 -04:00
Ben Byer 5e209b21f3 XNEST: removed obsolete hack to build under Darwin 2007-09-19 03:44:46 -07: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
Daniel Stone 2f33f4065d Xnest: port to new input API
Port Xnest to Get{Pointer,Keyboard}Events, plus the new mieq API.
2006-10-23 02:52:35 +03:00
Adam Jackson 0aaac95b0d Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
Benjamin Herrenschmidt 2dc7b5e0d9 Move call to xf86WrapperInit() to OsVendorInit() in xf86Init.c and remove
stubs in other DDX.
2006-02-13 04:43:40 +00:00
Eric Anholt 5249416d09 Add stub xf86WrapperInits so that the servers will build even if os/ was
built with XFree86LOADER set.
2006-02-11 22:40:50 +00:00
Kevin E Martin 6b546d0ec0 Add #include <xnest-config.h> to the Xnest source files for modularization. 2005-07-14 03:36:44 +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
Adam Jackson aa7fb99bc7 Bug #3030: Fix Xnest keyboard state handling. (Mark McLoughlin) 2005-06-25 21:28:48 +00:00