Enrico Weigelt, metux IT consult
0f107b62c4
dix: rename selection.h to selection_priv.h
...
rename it in order to reflects it's private nature (not exported).
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-06-28 01:18:46 +02:00
Enrico Weigelt, metux IT consult
0fe2d96262
dix: unexport selection functions
...
No driver needs them, so no reason to keep them exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-06-28 01:07:43 +02:00
Enrico Weigelt, metux IT consult
8214be8961
dix: don't install selection.h anymore
...
This file isn't included by any driver - not even indirectly, and hard
to imagine any driver ever needs it, so no need to keep it installed.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2024-06-28 00:47:51 +02:00
nerdopolis
05c63d2a02
modesetting: Fix hang when all probed cursor sizes fail to find a minimum one
...
This fixes a hang on simpledrm where min_cursor_height and min_cursor_width is
never established, and drmmode_load_cursor_argb_check would infinitely when
the minimum values where 0 or less.
2024-06-24 09:53:11 -04:00
Michel Dänzer
8e8bc0a1ef
xwayland: Try manual redirection for surface window in glamor_check_flip
...
If the surface window already uses automatic redirection, we can upgrade
to manual redirection and save some blits with common use cases.
This fixes a minor performance regression from a65bb8480a ('Revert
"xwayland/glamor: Avoid implicit redirection with depth 32 parent
windows"') with mutter >= 44.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1570 >
2024-06-24 08:26:46 +00:00
Michel Dänzer
e1b8a12194
xwayland: Only ignore manual redirection by clients for surface window
...
If the manual redirection was done by xwl_present_maybe_redirect_window,
we are in control.
This allows xwl_present_maybe_redirect_window to work as intended again.
Previously, xwl_window_update_surface_window would ignore the window
redirected by xwl_present_maybe_redirect_window, which would result in
xwl_present_maybe_redirect_window undoing the redirection and bailing.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1570 >
2024-06-24 08:26:46 +00:00
Michel Dänzer
ed575eee81
xwayland: Drop pixmap parameter from xwl_present_maybe_redirect_window
...
Never used.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1570 >
2024-06-24 08:26:46 +00:00
Joaquim Monteiro
a6a993f950
os: Fix siHostnameAddrMatch in the case where h_addr isn't defined
...
When IPv6 support isn't enabled, and h_addr isn't defined,
there is no for loop, so the break statement is invalid.
Signed-off-by: Joaquim Monteiro <joaquim.monteiro@protonmail.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1572 >
2024-06-23 21:32:23 +00:00
Joaquim Monteiro
0ddcd87851
os: Fix assignment with incompatible pointer type
...
struct hostent->h_addr_list is of type char**, not const char**.
GCC considers this an error when in C99 mode or later.
Signed-off-by: Joaquim Monteiro <joaquim.monteiro@protonmail.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1572 >
2024-06-23 21:32:23 +00:00
Enrico Weigelt, metux IT consult
34662f15af
os: unexport fields from opaque.h not used by modules / drivers
...
There're lots of field that aren't used by any modules or drivers,
thus no need to keep them exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1351 >
2024-06-23 21:19:27 +00:00
Enrico Weigelt, metux IT consult
06b599edb6
dix: unexport fields from opaque.h not used by modules/drivers
...
Lots of fields from opaque.h aren't used by any drivers/modules and thus
don't need to be exported at all.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1351 >
2024-06-23 21:19:27 +00:00
Enrico Weigelt, metux IT consult
53e8ba3aff
dix: move party_like_its_1989 into dix_priv.h
...
Internal symbol, no need to have it in public header.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1351 >
2024-06-23 21:19:27 +00:00
Enrico Weigelt, metux IT consult
d8cbcfd601
dix: colormap: fix name clash with win32 api on UpdateColors
...
As soon as winapi headers are included, we're running into a name clash
on UpdateColors(), since winapi has a function by the same name.
Trivial fix simply renaming our own UpdateColors() function.
../dix/colormap.c:110:13: error: conflicting types for ‘UpdateColors’
110 | static void UpdateColors(ColormapPtr /*pmap */
| ^~~~~~~~~~~~
In file included from /usr/share/mingw-w64/include/windows.h:71,
from /usr/share/mingw-w64/include/winsock2.h:23,
from /usr/i686-w64-mingw32/include/X11/Xwinsock.h:57,
from ../os/osdep.h:138,
from ../dix/colormap.c:57:
/usr/share/mingw-w64/include/wingdi.h:3202:28: note: previous declaration of ‘UpdateColors’ was here
3202 | WINGDIAPI WINBOOL WINAPI UpdateColors(HDC hdc);
| ^~~~~~~~~~~~
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1351 >
2024-06-23 21:19:27 +00:00
Enrico Weigelt, metux IT consult
facdaae4e8
xace: typesafe hook function for XACE_KEY_AVAIL
...
he generic XaceHook() call isn't typesafe (und unnecessarily slow).
Better add an explicit function, just like we already have for others.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556 >
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult
591d95c79e
xace: typesafe hook function for XACE_AUTH_AVAIL
...
he generic XaceHook() call isn't typesafe (und unnecessarily slow).
Better add an explicit function, just like we already have for others.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556 >
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult
305f2d59d8
xace: typesafe hook function for XACE_SCREENSAVER_ACCESS
...
he generic XaceHook() call isn't typesafe (und unnecessarily slow).
Better add an explicit function, just like we already have for others.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556 >
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult
51d8bcfc0d
xace: typesafe hook function for XACE_SCREEN_ACCESS
...
he generic XaceHook() call isn't typesafe (und unnecessarily slow).
Better add an explicit function, just like we already have for others.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556 >
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult
47d6c3ad75
xace: typesafe hook function for XACE_SERVER_ACCESS
...
he generic XaceHook() call isn't typesafe (und unnecessarily slow).
Better add an explicit function, just like we already have for others.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556 >
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult
0f6bb23bc2
xace: typesafe hook function for XACE_EXT_ACCESS
...
he generic XaceHook() call isn't typesafe (und unnecessarily slow).
Better add an explicit function, just like we already have for others.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556 >
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult
922b7685dc
xace: typesafe hook function for XACE_CLIENT_ACCESS
...
The generic XaceHook() call isn't typesafe (und unnecessarily slow).
Better add an explicit function, just like we already have for others.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556 >
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult
3dfe00d5e0
xace: typesafe hook function for XACE_RECEIVE_ACCESS
...
The generic XaceHook() call isn't typesafe (und unnecessarily slow).
Better add an explicit function, just like we already have for others.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556 >
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult
67e468c8bd
xace: typesafe hook function for XACE_SEND_ACCESS
...
The generic XaceHook() call isn't typesafe (und unnecessarily slow).
Better add an explicit function, just like we already have for others.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556 >
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult
9524ffee89
xace: typesafe hook function for XACE_DEVICE_ACCESS
...
The generic XaceHook() call isn't typesafe (und unnecessarily slow).
Better add an explicit function, just like we already have for others.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556 >
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult
ae3c573337
xace: typesafe hook function for XACE_RESOURCE_ACCESS
...
The generic XaceHook() call isn't typesafe (und unnecessarily slow).
Better add an explicit function, just like we already have for others.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556 >
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult
632a48a057
Xace: clean up XaceHookDispatch() declaration
...
Overloading real function name with macro makes it unnecessarily
complicated. Just rename the real function.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556 >
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult
3e0a4ab712
Xace: unexport Xace functions
...
These aren't used by any drivers, so no need to keep them exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556 >
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult
22a3014c50
Xace: dont install xace.h and xacestr.h anymore
...
These aren't used by any drivers, so no need to keep them installed.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556 >
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult
601fd0fd84
xfixes/xace: fix pointer type mismatch on XFixesSelectSelectionInput()
...
This could potentially be security related or crash the server:
XFixesSelectSelectionInput() calls the XACE_SELECTION_ACCESS hook with
wrong parameter type: XID instead of pointer to Selection struct.
It seems that it hadn't been kept up in XACE changed to polyinstantiation.
When XACE is used (eg. Security or SELinux extension enabled), this can
easily lead to memory corruptions at attacker-controlled locations, since
the client-given XID is interpreted as the memory location of Selection
structure.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556 >
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult
9c95347244
Xext: drop _PANORAMIX_SERVER
...
This used to be for panoramiXproto.h, but it doesn't look at it anymore,
so no need to keep it around.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1551 >
2024-06-23 19:31:46 +00:00
Enrico Weigelt, metux IT consult
c77bcb9f7f
Xext: securitysrv.h: drop hacks for including secur.h
...
The secur.h doesn't need the symbols defined here (eg. Status or Display)
anymore, so no need to keep it around anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1550 >
2024-06-23 19:20:12 +00:00
Enrico Weigelt, metux IT consult
224fa46f26
include: dix.h: fix outdated comment
...
The comment about ClientPtr also being defined in misc.h is outdated
for about 20 years now: XFree86 4.3.0.1 dropped the redundant definition
over there.
It's still also in Xdefs.h, so the guard is still needed.
Fixes: d568221710
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1514 >
2024-06-23 18:13:30 +00:00
Enrico Weigelt, metux IT consult
487eb46826
os: move xserver_poll.h into os/ directory
...
This header isn't public and holds defines for code in os/ directory,
so no need to keep it in the global header dir - it's probably better
off in os/ directory - just like we already have with many others.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1389 >
2024-06-21 00:53:39 +00:00
Enrico Weigelt, metux IT consult
245f77cfdb
mi: drop unused miPolyFillRect()
...
With removal of Xwin's NATIVEGDI (back a decade ago), the last caller is
gone, and it also doesn't seem to be called by any driver.
Fixes: 8465ee788f
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1504 >
2024-06-21 00:24:56 +00:00
Enrico Weigelt, metux IT consult
cdb4d5648a
kbd: move _XkbWantsDetectableAutoRepeat() macro into dix/events.c
...
That's the only place where it is used, so no need to keep it
in a public header.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1462 >
2024-06-18 02:10:04 +00:00
Enrico Weigelt, metux IT consult
f8057261fe
os: drop extra ifdefs for AF_INET6
...
Since IPv6 is now only defined if IPv6 is really supported, we don't
need to ifdef on AF_INET6 anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1539 >
2024-06-18 01:59:33 +00:00
Enrico Weigelt, metux IT consult
bc55a98d62
meson: explicitly check whether AF_INET6 is available
...
We're currently not checking whether IPv6 is available before build,
so it just gets silently disabled if AF_INET6 is missing - even
when user wants to enable it explicitly. Adding explicit check into
meson.build, so failing when ipv6 option enabled, but no IPv6 supported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1539 >
2024-06-18 01:59:33 +00:00
Enrico Weigelt, metux IT consult
88b2257cc4
os: drop duplicate nested ifdef TCPCONN
...
This #ifdef is always true, since two lines above it's already
checked that TCPCONN is defined.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1539 >
2024-06-18 01:59:33 +00:00
Enrico Weigelt, metux IT consult
9d6a1d1118
os: access.c: drop unnecessary ifdef
...
Conditional on ipv6 around including <arpa/inet.h> isn't necessary.
The only reason target not having it is win32, but it doesn't enable
SIOCGLIFCONF anyways.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1539 >
2024-06-18 01:59:33 +00:00
Enrico Weigelt, metux IT consult
842e866155
xnest: don't silently disable Xnest
...
The current implementation silently disables Xnest, even if requested
explcitly. That's a bit unstable behaviour - it's better to break the
build in those cases, just disable silently in auto mode.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1534 >
2024-06-18 01:44:26 +00:00
Enrico Weigelt, metux IT consult
1ead670476
xnest: don't force it off on Windows
...
No reason to explicitly force it off on Windows - if dependencies are present,
we can build it. Even though it will be rarely needed.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1534 >
2024-06-18 01:44:26 +00:00
Enrico Weigelt, metux IT consult
4a27ff7a1a
dix: drop unused args from CreateRootCursor()
...
The args have become dummies almost two decades ago, so no need
to keep them any longer.
Fixes: 0afeb0241a
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1522 >
2024-06-18 01:33:56 +00:00
Enrico Weigelt, metux IT consult
27babe0334
mi: move *_VISUALS defines into consumer source file
...
These are only needed inside one .c source, so no need to keep thm exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1498 >
2024-06-18 01:22:52 +00:00
Enrico Weigelt, metux IT consult
98104c969d
mi: drop unused SWAPPT() macro
...
Leftover of dropping mfb about 1.5 decades ago.
Fixes: f31bd087e8
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1499 >
2024-06-18 01:12:42 +00:00
Enrico Weigelt, metux IT consult
62a0a58717
mi: drop unused XMAJOROCTANTS
...
It hasn't been used for really long time, the history even doesn't
tell whether it ever had been used.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1500 >
2024-06-18 01:02:26 +00:00
Enrico Weigelt, metux IT consult
71b207a2eb
os: drop SUN-DES-1 authentication
...
DES isn't considered secure anymore for long time now, more and more platforms
dropping DES from their RPC implementations, and even the one where it came
from (Solaris) disabled it for a decade now. We have much better alternatives
(eg. passing creds via Unix socket for local connections, ssh tunneling,
MIT-MAGIC-COOKIE-1, ...), so it's unlikely anybody still really relying on it.
Therefore, sweep it out.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1453 >
2024-06-18 00:52:11 +00:00
Enrico Weigelt, metux IT consult
229a6953ad
xfree86: x86emu: rename segment register fields
...
Instead of keeping lots of special hacks for Solaris, just rename the
field of struct i386_segment_regs, so we don't need special care anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1548 >
2024-06-18 00:41:38 +00:00
Enrico Weigelt, metux IT consult
0a0731721f
xfree86: common: include math.h unconditionally
...
The header exists on all supported platform, maybe some might still need
to define _XOPEN_SOURCE to get pow() defined.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1548 >
2024-06-18 00:41:38 +00:00
Enrico Weigelt, metux IT consult
fd6fe36622
xfree86: os-support: simplify pci init
...
All supported platforms, except Linux, have have to call xf86InitVidMem()
from xf86scanpci(), so we can make the code much simpler.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1548 >
2024-06-18 00:41:38 +00:00
Enrico Weigelt, metux IT consult
1b49f6ddb8
kdrive: drop Solaris specific hack
...
Since kdrive is only working on Unix'es, we don't need to care whether
that file might not exist on Windows, neither any need for doing so
exlusively on Solaris.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1548 >
2024-06-18 00:41:38 +00:00
Enrico Weigelt, metux IT consult
83c94b7345
record: clean up Sun/Solaris specific hack
...
Instead of selectively undefining individual symbols with platform
specific hacks, just rename the enum values.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1548 >
2024-06-18 00:41:38 +00:00