Commit Graph

9371 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult ec50b25d0b 1 2024-09-13 19:18:45 +02:00
Enrico Weigelt, metux IT consult c56c11574d hack1 2024-09-13 19:18:45 +02:00
Enrico Weigelt, metux IT consult e7b358e174 1 2024-09-13 19:18:45 +02:00
Enrico Weigelt, metux IT consult 3802b10cdb Xnest: move xnestEventmask into struct xnest_upstream_info
This is per upstream connection state, so it's better of in the
upstream information struct.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:18:45 +02:00
Enrico Weigelt, metux IT consult b02a5ebc5e Xnest: make GC funcs static
These aren't used anywhere else, outside GC.c, just referenced in the func
vector struct, so no need to have them publicly visible.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:18:45 +02:00
Enrico Weigelt, metux IT consult 889a25e4cc Xnest: explicit GC operation struct initialization
Just doing array-like listing of the init values is error-prone:
somebody might change the order in the struct and things will going wild.

Better be explicit about which fields are assigned to which values.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:18:45 +02:00
Enrico Weigelt, metux IT consult 1dbffd9368 Xnest: move xnestBitmapGC into struct xnest_upstream_info
This is per upstream connection state, so it's better of in the
upstream information struct.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:18:45 +02:00
Enrico Weigelt, metux IT consult 3a317cdd8b hack 2024-09-13 19:18:45 +02:00
Enrico Weigelt, metux IT consult 6c9ef7905a WIP: rootless mode
2do: input not working yet
     properties (eg. window name aren't set)
     connection closes when window closed
2024-09-13 19:18:45 +02:00
Enrico Weigelt, metux IT consult 00da0f625f Xnest: write through window properties to upstream server
Write through the window properties set by Xnest's client to the
upstream windows.

This is important for rootless mode.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:18:45 +02:00
Enrico Weigelt, metux IT consult 731e84e592 Xnest: helper for writing property by atom and type name
Add a little helper for writing properties, using atom and type as string
instead of XIDs. The upstream's atom XIDs are looked up automatically.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:18:45 +02:00
Enrico Weigelt, metux IT consult 3a53bebd2f Xnest: helper for intern'ing atoms
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:18:45 +02:00
Enrico Weigelt, metux IT consult 81b041cae3 Xnest: move per-screen screensaver window to xnest_screen_info struct 2024-09-13 19:18:45 +02:00
Enrico Weigelt, metux IT consult 56c646cb63 Xnest: xnestWindowParent macro by xnest_upstream_window_parent()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:18:45 +02:00
Enrico Weigelt, metux IT consult 6f20cee79c Xnest: move per-screen upstream frame window into separate screen private struct
Start collecting the per-screen data into an own struct. Leaving this struct
in a global array (just like the individual fields) right now, because several
places still need to iterate over it. In later steps might move into a per
screen's devPrivate.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:18:45 +02:00
Enrico Weigelt, metux IT consult 4dae2e60c1 bsd: drop PCCONS support
The old PCCONS driver only seems to be used on minimal install disks and
cannot coexist with newer ones, so there's probably no practical use case for
supporting it in Xorg anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:15:50 +02:00
Enrico Weigelt, metux IT consult a1273bb655 (!1691) os: log: replace VErrorF() by LogVMessageVerb()
Since LogVMessageVerb() is now signal safe, we can use this one instead.
Leaving VErrorF() macro for backwards compat with drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:56 +02:00
Enrico Weigelt, metux IT consult 8c0bf80819 (!1691) xwin: drop duplicate OsVendorVErrorF()
It really doesn't seem to be necessary to protect a LogVMessageVerb()
call by extra mutex on windows only, while obviously not needed on
any other platform.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:56 +02:00
Enrico Weigelt, metux IT consult ea7623a830 (!1691) os: log: replace VErrorFSigSafe() by VErrorF()
Since VErrorF() is now signal safe, we can use this one instead.
Leaving VErrorFSigSafe() macro for backwards compat with drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:56 +02:00
Enrico Weigelt, metux IT consult 5f98608ac5 (!1691) os: log: replace ErrorFSigSafe() by ErrorF()
Since ErrorF() is now signal safe, we can use this one instead.
Leaving ErrorFSigSafe() macro for backwards compat with drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:56 +02:00
Enrico Weigelt, metux IT consult 3553ca08a6 (!1691) os: log: replace LogMessageVerbSigSafe() by LogMessageVerb()
Since LogMessageVerb() is now signal safe, we can use this one instead.
Leaving LogMessageVerbSigSafe() macro for backwards compat with drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:56 +02:00
Enrico Weigelt, metux IT consult a1616d7b25 (!1688) os: log: add syslog support
Add support for logging to syslog.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:55 +02:00
Enrico Weigelt, metux IT consult 0fc93c3a4e (!1688) meson.build: move writing conf_data into tail of main meson file
This allows us to do further probing in the included meson files:
Individual subdirectories (eg. DDXes, extensions, OS layer, ...)
can now probe things that are only relevant to them - no need to fill
the already too fat includes/meson.build with even more things.

Preparation for upcoming commits that'll make us of that.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:55 +02:00
Enrico Weigelt, metux IT consult 5951436dcb (!1688) os: directly set log file sync flag, instead of using LogSetParameter()
No need for extra call to some demuxer function for nothing but setting a
simple bool variable. Setting the sync flag really is nothing more than just
writing some value into a variable, so it's trivial to just to do that, instead
of having an unncessarily complex "universal setter" for that.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:55 +02:00
Enrico Weigelt, metux IT consult 6fe63f6393 (!1688) os: directly set log file verbosity level, instead of using LogSetParameter()
No need for extra call to some demuxer function for nothing but setting a
simple int variable. Setting verbosity level really is nothing more than just
writing some value into a variable, so it's trivial to just to do that, instead
of having an unncessarily complex "universal setter" for that.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:55 +02:00
Enrico Weigelt, metux IT consult cd0749f641 (!1688) os: directly set console verbosity level, instead of using LogSetParameter()
No need for extra call to some demuxer function for nothing but setting a
simple int variable. Setting verbosity level really is nothing more than just
writing some value into a variable, so it's trivial to just to do that, instead
of having an unncessarily complex "universal setter" for that.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:55 +02:00
Enrico Weigelt, metux IT consult 659b55477c (!1688) os: unexport internal logging functions
Lots of logging functions, especially init and teardown aren't called
by any drivers/modules, so no need to keep them exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:55 +02:00
Enrico Weigelt, metux IT consult 749375d044 (!1679) xfre86: drop xf86Msg() in favor of LogMessageVerb()
This function is doing the same like LogMessageVerb(), so no need to keep
around a duplicate implementation. Leaving it as a macro, until all callers,
also in drivers, have been migrated.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:55 +02:00
Enrico Weigelt, metux IT consult ccf5015f88 (!1679) xfree86: drop xf86MsgVerb() in favor of LogMessageVerb()
This function is doing the same like LogMessageVerb(), so no need to keep
around a duplicate implementation. Leaving it as a macro, until all callers,
also in drivers, have been migrated.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:55 +02:00
Enrico Weigelt, metux IT consult fb270437d9 (submit/rename-panoramix-sym) rename old symbol PANORAMIX to XINERAMA
PANORAMIX was the original working title of the extension, before it became
official standard. Just nobody cared about fixing the symbols to the official
naming.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:55 +02:00
Enrico Weigelt, metux IT consult 4958e8bacb (submit/drop-cygwin) drop remains of cygwin support
Cygwin support doesn't seem to be used anymore, so it can be dropped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult 7355f5f840 (submit/xnest-gcrec) fix name clash on 'GC' between Xlib and Xserver
Both xlib as well as the Xserver use the same identifier "GC" for
different types. While on xlib it's just the numerical ID of a GC,
the xserver defines a struct for it by the same name. This is this
ugly and needs ridiculous hacks for Xserver code that needs xlib.

Easy to solve by just renaming the GC typedef to GCRec (consistent
with how we're naming other structs) and replacing GC* by GCPtr.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult b52ff50568 (submit/bsd-defines) xfree86: os-support: move including machine/sysarch.h out of public header
The only consumer seems to be one BSD specific file, the few drivers using
the *_iopl seem to include it on their own. Thus, no need to keep it in
public headers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult 7a292adac0 (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-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult e9da6db826 (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-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult d37ef57e7a (submit/cmdline-funcs) os: unexport command line args handling functions
These functions shouldn't be called by drivers or extensions, thus
shouldn't be exported. Also moving it to separate header, so the
already huge ones aren't cluttered with even more things.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult 18dc7624bf (submit/fix-char-signedness) xfree86: parser: scan: fix char signess mismatch
On NetBSD gives warning:

In file included from /usr/include/ctype.h:100,
                 from ../hw/xfree86/parser/scan.c:58:
../hw/xfree86/parser/scan.c: In function ‘xf86getToken’:
../hw/xfree86/parser/scan.c:343:50: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  343 |         else if ((c == ',') && !isalpha(configBuf[configPos])) {
      |                                                  ^
../hw/xfree86/parser/scan.c:346:50: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  346 |         else if ((c == '-') && !isalpha(configBuf[configPos])) {
      |                                                  ^
../hw/xfree86/parser/scan.c: In function ‘xf86nameCompare’:
../hw/xfree86/parser/scan.c:1031:19: warning: array subscript has type ‘char’ [-Wchar-subscripts]
 1031 |     c1 = (isupper(*s1) ? tolower(*s1) : *s1);
      |                   ^
../hw/xfree86/parser/scan.c:1031:34: warning: array subscript has type ‘char’ [-Wchar-subscripts]
 1031 |     c1 = (isupper(*s1) ? tolower(*s1) : *s1);
      |                                  ^
../hw/xfree86/parser/scan.c:1032:19: warning: array subscript has type ‘char’ [-Wchar-subscripts]
 1032 |     c2 = (isupper(*s2) ? tolower(*s2) : *s2);
      |                   ^
../hw/xfree86/parser/scan.c:1032:34: warning: array subscript has type ‘char’ [-Wchar-subscripts]
 1032 |     c2 = (isupper(*s2) ? tolower(*s2) : *s2);
      |                                  ^
../hw/xfree86/parser/scan.c:1042:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
 1042 |         c1 = (isupper(*s1) ? tolower(*s1) : *s1);
      |                       ^
../hw/xfree86/parser/scan.c:1042:38: warning: array subscript has type ‘char’ [-Wchar-subscripts]
 1042 |         c1 = (isupper(*s1) ? tolower(*s1) : *s1);
      |                                      ^
../hw/xfree86/parser/scan.c:1043:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
 1043 |         c2 = (isupper(*s2) ? tolower(*s2) : *s2);
      |                       ^
../hw/xfree86/parser/scan.c:1043:38: warning: array subscript has type ‘char’ [-Wchar-subscripts]
 1043 |         c2 = (isupper(*s2) ? tolower(*s2) : *s2);
      |                                      ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult dde503d2b0 (submit/fix-char-signedness) xfree86: common: xf86Configure: fix char signess mismatch
On NetBSD gives warning:

../hw/xfree86/common/xf86Configure.c: In function ‘xf86AddBusDeviceToConfigure’:
../hw/xfree86/common/xf86Configure.c:125:50: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  125 |     for (j = 0; (lower_driver[j] = tolower(driver[j])); j++);
      |                                                  ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult 96b5a504a2 (submit/fix-char-signedness) xfree86: common: xf86pciBus: fix char signess mismatch
On NetBSD gives warning:

In file included from /usr/include/ctype.h:100,
                 from ../hw/xfree86/common/xf86pciBus.c:35:
../hw/xfree86/common/xf86pciBus.c: In function ‘xf86ParsePciBusString’:
../hw/xfree86/common/xf86pciBus.c:286:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  286 |             if (!isdigit(d[i])) {
      |                           ^
../hw/xfree86/common/xf86pciBus.c:293:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  293 |         if (!isdigit(p[i])) {
      |                       ^
../hw/xfree86/common/xf86pciBus.c:307:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  307 |         if (!isdigit(p[i])) {
      |                       ^
../hw/xfree86/common/xf86pciBus.c:320:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  320 |         if (!isdigit(p[i])) {
      |                       ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult f1cf0a123a (submit/fix-char-signedness) xfree86: common: xf86Option: fix char signess mismatch
On NetBSD gives warning:

In file included from /usr/include/ctype.h:100,
                 from ../hw/xfree86/common/xf86Option.c:39:
../hw/xfree86/common/xf86Option.c: In function ‘xf86NormalizeName’:
../hw/xfree86/common/xf86Option.c:915:25: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  915 |             if (isupper(*p))
      |                         ^
../hw/xfree86/common/xf86Option.c:916:32: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  916 |                 *q++ = tolower(*p);
      |                                ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult d36e63dac8 (submit/fix-char-signedness) xfree86: common: xf86Bus: fix char signess mismatch
On NetBSD gives warning:

In file included from /usr/include/ctype.h:100,
                 from ../hw/xfree86/common/xf86Bus.c:36:
../hw/xfree86/common/xf86Bus.c: In function ‘StringToBusType’:
../hw/xfree86/common/xf86Bus.c:270:22: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  270 |     if (isdigit(busID[0])) {
      |                      ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult cc2ad2e3e5 (submit/move-systemd-logind.h) move systemd-logind.h to hw/xfree86/os-support/linux
systemd is linux specific and the actual implementation is under the
os-support layer of xfree86 ddx. Thus no need to keep it in global
include directory, putting it onto the linux specific os-support instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult 0fbca1cf56 (submit/bsd-DEV_MEM) xfree86: os-support: bsd: consolidate duplicate defines
Consolidate defines duplicated across several sources into one header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult 385e4f9005 (submit/bsd-DEV_MEM) xfree86: os-support: unexport DEV_MEM defines
DEV_MEM define isn't used by any drivers, and BSD seems to be the only
platform using /dev/pmem instead of /dev/mem - as well as the DEV_MEM
define from xf86_OSlib.h (Linux uses the symbol, but defines on its own)

Therefore, just define it where actually used and drop it from the global
xf86OSlib.h file.

Note that /dev/pmem refers to physical memory, not to be mixed up with
Linux's persistent memory subsys, which uses /dev/pmem[N] device nodes.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult 7bec1a45f1 (submit/hotplug.h) include: move out private definitions from hotplug.h
Public server module API shouldn't be clobbered with private definitions,
thus move them out to private header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult 1f5b834576 (submit/hotplug.h) xfree86: common: make _xf86_get_platform_device_attrib() a real function
Doing so that struct OdevAttributes doesn't need to be exposed to
drivers anymore. It really doesn't seem to be a hot path, so not
inlining anymore shouldn't have any practical performance impact.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult 0ad6ffdd48 (submit/cleanup-api-xfree86) xfree86: sdksyms.sh: add more headers
Add some headers that are still needed by drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult 9e18ce68d4 (submit/cleanup-api-xfree86) xfree86: move private definitions out of dri.h
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult 29a09e2576 (submit/cleanup-api-xfree86) xfree86: move private definitions out of dri2.h
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:18 +02:00
Enrico Weigelt, metux IT consult 7ad91ede66 (submit/cleanup-api-xfree86) xfree86: ddc: move private definitions from xf86DDC.h to xf86DDC_priv.h
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 19:14:18 +02:00