Commit Graph

9868 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
1a0b8ac61b xwin: fix missing prototype of parse_file()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 14:44:30 +02:00
Collin
6c6cbbdc57 screen: initialize rootDepth to zero to fix uninitialized-variable warning 2025-08-05 14:44:22 +02:00
Enrico Weigelt, metux IT consult
2423f98886 xfree86: fbdevhw: fix fbdevHWInit() parameter
device name should be const char *.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 14:44:15 +02:00
Enrico Weigelt, metux IT consult
a8fa4cba7a xfree86: i2c: constify I2CBusRec::name
The bus name is always assigned to string literals, thus pointing to
constant data.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 13:26:12 +02:00
Enrico Weigelt, metux IT consult
818001db61 xfree86: fbdevhw: fix fbdevHWProbe() parameter
the device name parameter should be const char *.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 12:57:40 +02:00
Enrico Weigelt, metux IT consult
968500535e meson: move MAXCLIENTS and LIMITCLIENTS into dix-config.h
Both are potentially tunable variables, and MAXCLIENTS is (still) used by
intel-driver, but also by os specific parts that must not include misc.h

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 12:31:52 +02:00
Enrico Weigelt, metux IT consult
d8925febf6 xfree86: fix xf86I2CBusInit() prototype
name parameter should be const char *

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 12:30:23 +02:00
Enrico Weigelt, metux IT consult
e9c7aa82e9 xfree86: drm_platform: fix warning on potentially unitialized variable
../hw/xfree86/os-support/shared/drm_platform.c:37:13: warning: variable 'paused' is uninitialized when used here [-Wuninitialized]
     37 |         if (paused) {
        |             ^~~~~~
  ../hw/xfree86/os-support/shared/drm_platform.c:31:16: note: initialize the variable 'paused' to silence this warning
     31 |     Bool paused, server_fd = FALSE;
        |                ^
        |                 = 0
  1 warning generated.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 12:30:09 +02:00
Enrico Weigelt, metux IT consult
44ec9b0e5b xwin: win.h: missing include of dix/dix_priv.h
Needed for dixAddAtom()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 12:09:39 +02:00
Enrico Weigelt, metux IT consult
0c33925ab0 kdrive: allow win32 build w/o sysv ipc
Win32 doesn't have SysV IPC, so we need to build it w/o this here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:55:09 +02:00
Enrico Weigelt, metux IT consult
1e214abf9d xwin: fix unused variables in winSetShapeMultiWindow()
Fix warnings on unused variables.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:46:03 +02:00
Enrico Weigelt, metux IT consult
96b0e59066 kdrive: ephyr: don't use %hhu in error messages
The win32/mingw libc doesn't support this conversion type.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:32:46 +02:00
Enrico Weigelt, metux IT consult
2e0c442567 kdrive: ephyr: include glamor_priv.h only when glamor is enabled
Necessary for building on platforms without any GL at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:16:56 +02:00
Enrico Weigelt, metux IT consult
d14679ff29 kdrive: xephyr: link pthread on mingw for nanosleep()
For strange reaons, nanosleep() is in libpthread on mingw platform,
so we have to link it here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:16:47 +02:00
Joseph Crowell
73db0ed5d4 xfree86: drivers: common: remove incorrect #ifndef _XORG_CONFIG_H_
These functions are not defined anywhere else and are still necessary in the AMD drivers when using #include <xorg-config.h>
2025-08-05 11:16:34 +02:00
Enrico Weigelt, metux IT consult
0102f4361f kdrive: ephyr: don't try to install handler for SIGUSR1 on win32
Windows has no Unix-type signals.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-01 17:18:12 +02:00
Enrico Weigelt, metux IT consult
b1393f59aa xfree86: fbdevhw: fix prototypes of fbdevhwstub
The prototypes between the stub functions and the real ones mismatched.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-01 17:07:42 +02:00
Enrico Weigelt, metux IT consult
46c5a87297 kdrive: don't include <err.h> anymore
We don't need it at all (and even shouldn't use it), and this breaks
the win32/mingw build.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-01 17:01:01 +02:00
Enrico Weigelt, metux IT consult
bb1f1752bd kdrive: fix build on win32/mingw
Yet one more clash between <windows.h> and Xserver on `CreateWindow` symbol:
The windows header has a `#define CreateWindow CreateWindowA`, so we need
to #undef it everywhere we're using `CreateWindow` - until we've got that
ugly header out of the way completely.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-01 16:41:19 +02:00
Enrico Weigelt, metux IT consult
36125623fd modesetting: fix skipping on empty properties in drmmode_output_set_property()
We actually need to skip the entry if p->atoms is NULL.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 04:46:57 +02:00
fish4terrisa-MSDSM
c754162a36 modesetting: ignore the drmmode if p->atoms is null
Some display drivers might cause p->atoms to be null if the display is
disabled. This will cause segfault when checking
if p->atoms[0] != property .
Some display drivers owned by qualcomm is known to cause this bug.

Signed-off-by: fish4terrisa-MSDSM <flyingfish.msdsm@gmail.com>
2025-07-11 17:14:07 +02:00
Enrico Weigelt, metux IT consult
dfcfdd67a6 xquartz: drop using HAVE_DIX_CONFIG_H
This symbol is always defined, and the header is always present,
so no need to check for it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-08 17:43:07 +02:00
Enrico Weigelt, metux IT consult
2c50fedc2d xfree86: inputtest: use FatalError() instead of abort()
Directly calling abort() doesn't print a stack trace, nor any useful message.
Instead FatalError() should be used in cases, where there's really no other
way than terminating the Xserver. The FatalError function also tries to make
a smooth shutdown (eg. resetting video mode), so console doesn't end up locked.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-08 15:56:06 +02:00
stefan11111
c4df9ecdc5 kdrive: add documenation for mouse arguments
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-08 13:13:20 +02:00
stefan11111
d0c507d9e7 kdrive: const-qualify KdAddConfig{Keyboard,Pointer}'s argument
The passed name buffer isn't changed by those functions ever
(it would be a bug if they did so), therefore it should be const.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-08 13:13:20 +02:00
stefan11111
836013edca kdrive: move a local variable declaration to the top of the scope
Makes the code more consistent with the rest of the codebase

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-08 13:13:20 +02:00
stefan11111
2884ede393 kdrive: fix incorrect NULL-check
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-08 13:13:20 +02:00
Enrico Weigelt, metux IT consult
c6777fe48e xnest: drop unused DarwinHandleGUI()
Obsolete since 17 years now, probably just forgotten to clean up.

Fixes: ef1c520537
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:10:02 +02:00
Enrico Weigelt, metux IT consult
2f46a02217 vfb: drop unused DarwinHandleGUI()
Obsolete since 17 years now, probably just forgotten to clean up.

Fixes: ef1c520537
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:10:02 +02:00
Enrico Weigelt, metux IT consult
93013224b4 xquartz: fix incomplete prototype of executable_path()
> ../hw/xquartz/mach-startup/bundle_trampoline.c:53:29: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
> static char *executable_path() {
>                             ^
>                              void
> 1 warning generated.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:09:33 +02:00
Enrico Weigelt, metux IT consult
74d5b7bb05 xquartz: drop unused field declarations in request handlers
Silence compiler warning on unused fields, eg.:

> ../hw/xquartz/applewm.c:692:5: warning: unused variable 'stuff' [-Wunused-variable]
>     REQUEST(xAppleWMQueryVersionReq);
>     ^
> ../include/dix.h:65:12: note: expanded from macro 'REQUEST'
>     type * stuff = (type *)client->requestBuffer;
>            ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:08:46 +02:00
Enrico Weigelt, metux IT consult
2069db50e7 xfree86: compat: make xf86MsgVerb() a bit less noisier
print the driver bug warning only once.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-03 16:55:14 +02:00
Enrico Weigelt, metux IT consult
c24372893b xfree86: compat: consolidate logging
Consolidate the redundant warnings into generic functions.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-01 17:11:28 +02:00
Enrico Weigelt, metux IT consult
28e739e05b xfree86: loadmod: locally scope the errtype variable
In CheckVersion() the errtype variable is used in two separate scopes,
but not globally, so it's cleaner to have it only in the scopes that
are actually using it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-01 17:03:12 +02:00
stefan11111
3d266528a9 kdrive: ephyr: use c99 struct initialization
For better readability and robustness against future changes, it's
better to use named struct initializers instead of array-like lists.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-01 16:50:01 +02:00
Enrico Weigelt, metux IT consult
6a3162d623 Xnest: fix analyzer warning on uninitialized DefaultVisual
In xnestOpenScreen(), some compilers/analyzers spitting out a false alarm on
`defaultVisual` field potentially used uninitialized. This can't practically
happen, but not all compilers/analyzers really can see that.

Adding a zero initializer doesn't cost us anything, so silencing that false
alarm is trivial.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 20:30:46 +02:00
notbabaisyou
461411c798 modesetting: allow enabling atomic mode.
The Linux kernel has long had code preventing Xorg from using atomic
modesetting due to various bugs in it's implementation, some of these
issues have since been fixed but some issues remain namely with DPMS
and other smaller things, we should allow users to opt-in by setting
"Option 'Atomic' 'True'"

This shouldn't cause any issues as the feature remains disabled by default.

Co-authored-by: Daniel Abrecht <public@danielabrecht.ch>
Signed-off-by: notbabaisyou <though-went-some-simple@proton.me>
2025-06-27 19:23:31 +02:00
notbabaisyou
4afcb1cd7b modesetting: Fix typo.
`modsetCreateScreenResources` -> `modesetCreateScreenResources`

Signed-off-by: notbabaisyou <though-went-some-simple@proton.me>
2025-06-27 17:10:33 +02:00
Mike Gelfand
4f7000f620 xquartz: add missing include for XkbSetRulesDflts
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 14:30:27 +02:00
Mike Gelfand
3e89bd7409 xquartz: add missing include for DeliverEvents
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 14:30:27 +02:00
Mike Gelfand
edb020e306 xquartz: depend on libXdmcp (includes osdep.h which includes X11/Xdmcp.h)
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 14:30:27 +02:00
Mike Gelfand
d89b3596f0 xquartz: depend on libX11 (includes X11/Xlib.h)
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 14:30:27 +02:00
Mike Gelfand
c06a2a3ed7 hw: add/fix include guards where missing/broken
Skipped headers designed for multiple or non-trivial inclusion:
* hw/xfree86/dri2/pci_ids/i810_pci_ids.h
* hw/xfree86/dri2/pci_ids/i915_pci_ids.h
* hw/xfree86/dri2/pci_ids/i965_pci_ids.h
* hw/xfree86/dri2/pci_ids/r200_pci_ids.h
* hw/xfree86/dri2/pci_ids/r300_pci_ids.h
* hw/xfree86/dri2/pci_ids/r600_pci_ids.h
* hw/xfree86/dri2/pci_ids/radeon_pci_ids.h
* hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h
* hw/xfree86/dri2/pci_ids/virtio_gpu_pci_ids.h
* hw/xfree86/dri2/pci_ids/vmwgfx_pci_ids.h

Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 13:58:05 +02:00
Enrico Weigelt, metux IT consult
828f9a1b7f xfree86: man: fix git URL
fix the git URL to point to Xlibre repository.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-23 16:50:19 +02:00
stefan11111
0746e6841a xfree86: compat: fix Ones for compilers where __builtin_popcountl is missing
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-06-23 14:14:48 +02:00
Enrico Weigelt, metux IT consult
3f5e4b1d97 xfree86: provide xf86DisableGeneralHandler() for Nvidia driver
The proprietary NVidia driver want's to call an internal function for reasons
unknown to us. Adding a little wrapper for it, that's also printing out some
warning message in the log.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-23 11:09:45 +02:00
Enrico Weigelt, metux IT consult
fca07a761c xfree86: export xf86FlipPixels() but keep it internal
Needed by the int10 module, so has to be in the symbol table.
But still not supposed to be used by out-of-tree drivers.

Reported-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-20 18:36:29 +02:00
Enrico Weigelt, metux IT consult
e523724d5e xfree86: export xf86ModeStatusToString() but keep it internal
Needed by the int10 module, so has to be in the symbol table.
But still not supposed to be used by out-of-tree drivers.

Reported-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-20 18:36:29 +02:00
Enrico Weigelt, metux IT consult
711359b75c xfree86: export xf86FindScreenForEntity() but keep it internal
Needed by the int10 module, so has to be in the symbol table.
But still not supposed to be used by out-of-tree drivers.

Reported-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-20 18:36:29 +02:00
Enrico Weigelt, metux IT consult
f5777ff1dc xfree86: export xf86IsEntityPrimary() but keep it internal
Needed by the int10 module, so has to be in the symbol table.
But still not supposed to be used by out-of-tree drivers.

Reported-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-20 18:36:29 +02:00