Commit Graph

18333 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
881663aa5b MAINTAINERS: add entry for documentation
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
50e98ab247 MAINTAINERS: add entry for tests
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
e7034c0778 MAINTAINERS: add entry for OS layer
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
3662bca04e MAINTAINERS: add entry for misc extensions
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
3ed3f3017e MAINTAINERS: add entry for double buffer extension
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
73690c341a MAINTAINERS: add entry for pseudoramix subsystem
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
e05020951a MAINTAINERS: add entry for present extension
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
4ed8f1e82d MAINTAINERS: add entry for sync extension
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
254ff48524 MAINTAINERS: add entry for shadow extension
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
d9a41770dc MAINTAINERS: add entry for record extension
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
9f6f55c27d MAINTAINERS: add entry for Xwin server
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
72f7f051c7 MAINTAINERS: add entry for framebuffer subsystem
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
1c60b5c410 MAINTAINERS: comment out broken M: tags
get_maintainer.pl can't cope w/ ? in the M: tag, so comment them out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
edcd5b7f8f MAINTAINERS: add Jeremy Sequoia for Rootless and Xquartz
Jeremy told me he's practically maintainer of the Rootless subsystem as well
as Xquartz server, but this hasn't been formally accounted yet (he's already
recorded for MacOS port). So, let's tidy up our book-keeping an give him
the proper attribution for his work in this areas.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
4605fdc254 MAINTAINERS: add xorg-devel to Xwayland entry
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
3513ade990 MAINTAINERS: add second F tag for damage extension
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
54ea9d5e56 MAINTAINERS: add F tag for Configuration subsystem
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
bf7b145faf MAINTAINERS: drop entries for removed stuff
Since this file should reflect the actual reality of this tree,
it doesn't make sense keeping historical records in here. Therefore
dropping entries for stuff that has long been removed from Xserver
tree (or never had been part of it).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
ce53c903ea MAINTAINERS: drop non-xserver entries
Since this file is just meant for the Xserver itself (and also shall replace
the corresponding entries in xorg-docs repo), dropping everything that's
outside of this source tree.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
7c3d16b936 MAINTAINERS: take Xnest maintainership
Picking up maintenance of Xnest and adding myself as maintainer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
d25383dac3 MAINTAINERS: copy over from xorg-docs
First step decoupling Xserver maintainers list from xorg-docs. Later commits
will drop every but the xserver tree itself. Once it's landed, xorg-docs
can just point over here.

Rationale:

* the Xserver itself already is a big project with lots of maintainers and
  evolving independently from other X packages.
* having this in a separate repo risk letting it run out of sync with actual
  reality, and even worse doesn't support having different maintainerships
  for different branches (eg. release lines, semi-forks, ...)
* having the xserver-related parts inside the Xserver tree makes it easier
  for tooling like get_maintainers.pl - eg. useful for finding maintainers
  or maillists for specific pathes
* clean code bases should be self-documenting, instead of spreading it to lots
  of external places (extra repos, wikis, etc)

X-Source-Commit: 9024082a504df81741a1b334963ff4842ffe934e
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 09:50:44 +00:00
Enrico Weigelt, metux IT consult
27b5530107 xfree86: drop remains of old USL compiler
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1286>
2024-02-19 09:21:36 +00:00
Enrico Weigelt, metux IT consult
6dafe3dbe6 drop remains of support for old Sun compilers
With transition from autoconf to meson, these aren't actually supported
anymore, and re-adding it isn't planned. Thus the now dead code pathes
can be completely removed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1286>
2024-02-19 09:21:36 +00:00
Yusuf Khan
db3aa4e03b hw/xfree86: fix NULL pointer refrence to mode name
Potentially, the pointer to the mode name could be unset, this can
occur with the xf86-video-nv DDX, in that case there isnt much we can do
except check if the next mode is any better.

Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
2024-02-19 03:51:25 +00:00
Enrico Weigelt, metux IT consult
a2e7904b1d fix: unused readIntVec()
[585/699] Compiling C object hw/xfree86/int10/libint10.so.p/generic.c.o
../hw/xfree86/int10/generic.c:103:1: warning: ‘readIntVec’ defined but not used [-Wunused-function]
  103 | readIntVec(struct pci_device *dev, unsigned char *buf, int len)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 01:02:32 +00:00
Enrico Weigelt, metux IT consult
8d2117abeb hw: xwayland: fix build if neither gbm nor eglstream available
glamor needs to be disabled if neither gbm nor eglstream is available,
otherwise build breaks.

Closes: xorg/xserver#1631
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 00:53:30 +00:00
Enrico Weigelt, metux IT consult
374ee7acd7 xkb: drop defining XKBSRV_NEED_FILE_FUNCS
No need to define XKBSRV_NEED_FILE_FUNCS, for about 15 years now
(since XKBsrv.h isn't used anymore), so drop it.

Fixes: e5f002edde
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 00:44:15 +00:00
Matthieu Herrb
0d4a7ed684 bsd_init.c: fix build on OpenBSD
isolate NetBSD specific VGAPCVTID ioctl(2) call.

Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2024-02-19 00:40:04 +00:00
Alan Coopersmith
584a9715c3 unifdef apollo
Apollo Domain/OS died in the 1990's and has never been supported in
the modular Xserver builds.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-17 16:31:46 -08:00
Matthieu Herrb
7dfe1c56b0 OpenBSD build fix: struct ucred is struct sockpeercred there 2024-02-18 00:16:38 +00:00
Matthieu Herrb
238f8edcaf xfree86/bsd: fix build on NetBSD/amd64.
The IOPL function for 64 bit systems is x86_64_iopl() there
2024-02-18 00:03:45 +00:00
Matthieu Herrb
59dac6af45 Add full prototypes in hw/xfree86/os-support/bsd/bsd-video.c
Trivial functions without parameters -> (void)
2024-02-17 23:50:59 +00:00
Matthieu Herrb
ae07e47559 Fix build on OpenBSD.
<dev/wscons/wsconsio.h> needs <sys/time.h> on OpenBSD.
This doesn't cause issues on NetBSD

Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2024-02-17 16:14:23 +01:00
Enrico Weigelt
442aec2219 include: move BUG_*() macros to separate header
Yet another step of uncluttering includes: move out the BUG_* macros
into a separate header, which then is included as-needed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-15 23:33:46 +00:00
Alan Coopersmith
a8bb924af1 os: Assume all supported non-WIN32 platforms have seteuid & saved_ids
Removes fallback code to fork and exec a "cat" command to read files.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-10 00:05:54 +00:00
Enrico Weigelt, metux IT consult
b3b86ae674 replace _X_INLINE by inline in internal static functions
Since xserver is compiled as C99, we just can use the `inline` keyword.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-05 19:26:14 +00:00
Florian Weimer
f0a187f55d xwayland: Use correct pointer types on i386
And other 32-bit architectures, where uint32_t and CARD32 are
not the same type.  Otherwise the build will fail with GCC 14
with errors like:

../hw/xwayland/xwayland-glamor.c: In function ‘xwl_glamor_get_formats’:
../hw/xwayland/xwayland-glamor.c:291:43: error: passing argument 3 of ‘xwl_get_formats_for_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  291 |                                           num_formats, formats);
      |                                           ^~~~~~~~~~~
      |                                           |
      |                                           CARD32 * {aka long unsigned int *}
../hw/xwayland/xwayland-glamor.c:238:38: note: expected ‘uint32_t *’ {aka ‘unsigned int *’} but argument is of type ‘CARD32 *’ {aka ‘long unsigned int *’}
  238 |                            uint32_t *num_formats, uint32_t **formats)
      |                            ~~~~~~~~~~^~~~~~~~~~~
../hw/xwayland/xwayland-glamor.c:291:56: error: passing argument 4 of ‘xwl_get_formats_for_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  291 |                                           num_formats, formats);
      |                                                        ^~~~~~~
      |                                                        |
      |                                                        CARD32 ** {aka long unsigned int **}
../hw/xwayland/xwayland-glamor.c:238:62: note: expected ‘uint32_t **’ {aka ‘unsigned int **’} but argument is of type ‘CARD32 **’ {aka ‘long unsigned int **’}
  238 |                            uint32_t *num_formats, uint32_t **formats)
      |                                                   ~~~~~~~~~~~^~~~~~~
../hw/xwayland/xwayland-glamor.c:295:28: error: passing argument 3 of ‘xwl_get_formats’ from incompatible pointer type [-Wincompatible-pointer-types]
  295 |                            num_formats, formats);
      |                            ^~~~~~~~~~~
      |                            |
      |                            CARD32 * {aka long unsigned int *}
../hw/xwayland/xwayland-glamor.c:217:26: note: expected ‘uint32_t *’ {aka ‘unsigned int *’} but argument is of type ‘CARD32 *’ {aka ‘long unsigned int *’}
  217 |                uint32_t *num_formats, uint32_t **formats)
      |                ~~~~~~~~~~^~~~~~~~~~~
../hw/xwayland/xwayland-glamor.c:295:41: error: passing argument 4 of ‘xwl_get_formats’ from incompatible pointer type [-Wincompatible-pointer-types]
  295 |                            num_formats, formats);
      |                                         ^~~~~~~
      |                                         |
      |                                         CARD32 ** {aka long unsigned int **}
../hw/xwayland/xwayland-glamor.c:217:50: note: expected ‘uint32_t **’ {aka ‘unsigned int **’} but argument is of type ‘CARD32 **’ {aka ‘long unsigned int **’}
  217 |                uint32_t *num_formats, uint32_t **formats)
      |                                       ~~~~~~~~~~~^~~~~~~
2024-02-02 09:36:52 +01:00
Wanli Niu
e62246641b dix: Fix segfault if CreateGC() failed in XaceHook()
CreateGC() allocates a new GC and then checks the resource access rights
with XaceHook().

If the call to XaceHook() fails (i.e. GC creation is not granted to the
client), CreateGC() exits early and calls FreeGC() to avoid leaking the
newly allocated GC.

If that happens, the screen's own CreateGC() has not yet been invoked,
and as a result the GC functions (GCfuncs) have not been set yet.

FreeGC() will invoke the funcs->DestroyClip() and the funcs->DestroyGC()
functions, but since those haven't been set, the Xserver will segfault
trying to call a NULL function.

To prevent that issue, make sure the GC's functions are initialized
prior to call them in FreeGC().

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1625
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2024-02-01 10:10:53 +01:00
Peter Hutterer
9c7c470b12 test: use a dbg() macro for the test output
Currently hardcoded to verbose = 0 until we have option parsing but meh.
2024-01-30 00:15:10 +00:00
Peter Hutterer
d178978ce2 test: specify non-negative log verbosity for the siglogging test
Less noise in the test output
2024-01-30 00:15:10 +00:00
Peter Hutterer
3c5eaedaf9 test: switch the remaining wrapped functions to use the macros
dixLookupWindow and dixLookupClient have a test-global default
implementation because overriding that in ever test doesn't make sense.
2024-01-30 00:15:10 +00:00
Peter Hutterer
7e9d167c9c test: make wrapping a function more generic
This cleans up some of the mess this code was in. Functions we need to
wrap can now have a standard implementation using WRAP_FUNCTION - that
macro declares the __real and __wrap functions and a wrapped_$func
global variable.

Tests can set that variable to their desired functions and it will be
then be called on demand.
2024-01-30 00:15:10 +00:00
Peter Hutterer
46b579e8d5 test: switch the unit tests to something resembling a test suite
The tests have inadvertent dependencies on each other so let's avoid
those by changing to a system that returns a null-terminated list of
test functions and our test runner iterates over those and forks off one
process per function.
2024-01-30 00:15:10 +00:00
Peter Hutterer
133e0d651c dix: fix valuator copy/paste error in the DeviceStateNotify event
Fixes 219c54b8a3
2024-01-22 21:24:58 +00:00
Michel Dänzer
abe3a08245 xwayland: Enable Present extension support also without glamor
This allows e.g.

 xfwm4 --vblank=xpresent

to hit the page flip path instead of copies.

In the future, Mesa might also use the Present extension with software
rendering.
2024-01-22 14:14:05 +00:00
Michel Dänzer
17986658bf xwayland: Add xwl_pixmap_get_wl_buffer helper
Preparation for the next commit.
2024-01-22 14:14:05 +00:00
Michel Dänzer
613e4466b4 xwayland: Handle NULL xwl_pixmap in xwl_shm_pixmap_get_wl_buffer 2024-01-22 14:14:05 +00:00
Michel Dänzer
f50ed265cf xwayland: Initialize Present extension support also with rootful
Multiple benefits, in particular:

* Fullscreen windows can hit the page flip path
* X client presentation is properly synchronized to the Wayland
  compositor refresh cycle via frame events
2024-01-22 14:14:05 +00:00
Michel Dänzer
e391d53076 xwayland/present: Update screen pixmap in xwl_present_execute
If the screen pixmap was also the toplevel window pixmap.

This can't happen yet, it will with the next commit though.
2024-01-22 14:14:05 +00:00
Olivier Fourdan
0cbf6d9326 xwayland: Add a -nokeymap option
By default, Xwayland (as any Wayland client) uses the keymap set by the
Wayland compositor using the standard Wayland protocol.

There are some specific uses cases where a user would want to let the
X11 clients control the keymap. However, the Wayland compositor may
(re)send the keymap at any time, overriding whatever change was made
using the X11 mechanisms.

Add a new "-nokeymap" option to Xwayland to instruct Xwayland to simply
ignore the standard Wayland mechanism to set the keymap, hence leaving
the control entirely to the X11 clients.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2024-01-22 13:01:18 +00:00