Commit Graph

21084 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
235a8e0f91 os: ospoll: include winsock2.h on WIN32 instead of misc.h
On WIN32 we need to include winsock2.h, but we can't include misc.h here
becaues it pulling in X11 headers that are conflicting with win32 headers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 17:41:20 +02:00
Enrico Weigelt, metux IT consult
d71ca03756 doc: Xinput.xml: some indention cleanups
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 17:40:01 +02:00
Enrico Weigelt, metux IT consult
d9f82ada19 os: xtranssock: win32: use separate symbol for socket close
Instead of redefining existing standard libc symbols, pick another symbol
that's mapped to the corresponding platform specific function.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 17:32:03 +02:00
Enrico Weigelt, metux IT consult
7fd5a6759e dix: inpututils: don't use %hhx printf pattern
mingw's printf() doesn't understand it yet, and it's not really
important here, so just use `%hx` instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 17:31:00 +02:00
Enrico Weigelt, metux IT consult
2353d7a710 os: xtrans: replace _XSERVTransSetOption() by _XSERVTransNonBlock()
The only option left is TRANS_NONBLOCKING, and we only enable and
never disable it. Thus trim down the code into one function for
exactly that.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 17:30:52 +02:00
Enrico Weigelt, metux IT consult
09a80bb1d5 doc: Xserver-spec.xml: replace tabs by 8 characters
Little indention cleanup.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 17:32:22 +02:00
Enrico Weigelt, metux IT consult
8bdc1a6cf3 Revert "doc: refactor and improve X11 input extension porting documentation"
This reverts commit b1ff69a654.

broke the docs build ... and it also seems certain pieces got even missing.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 17:27:00 +02:00
Enrico Weigelt, metux IT consult
ad53be3a32 os: xtrans: drop use of FNDELAY
That's an ancient symbol, which had been replaced by O_NDELAY long ago.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 17:10:58 +02:00
Enrico Weigelt, metux IT consult
399c51bb6d os: xtrans: drop _XSERVTransReadv() et al
It's not used anywhere, so no need to keep it around anymore.
We can also dispose the corresponding connection driver's procs here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 17:09:37 +02:00
Enrico Weigelt, metux IT consult
a317ae39ad os: xtrans: _XSERVTransGetHostname() variant for mingw target
Win32 does not have utsname(), but gethostname(), so we need a separate
implementation of _XSERVTransGetHostname() here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 17:05:49 +02:00
Enrico Weigelt, metux IT consult
3ac1db8b5e xwin: fix unused variables in winSetShapeMultiWindow()
Fix warnings on unused variables.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 17:05:29 +02:00
Enrico Weigelt, metux IT consult
3031e96abf os: xprintf: fix includes
It's better coding style to include the header with prototypes for
our own functions directly, instead of relying on it being included
indirectly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 17:01:10 +02:00
SuperDuperDeou
45434690cc dix: small diff files more C99 scoped declaration
Signed-off-by: SuperDuperDeou <87223140+SuperDuperDeou@users.noreply.github.com>
2025-07-31 16:57:44 +02:00
SuperDuperDeou
3feeeb9365 dix: enterleave.c more C99 scoped declaration
Signed-off-by: SuperDuperDeou <87223140+SuperDuperDeou@users.noreply.github.com>
2025-07-31 16:57:44 +02:00
SuperDuperDeou
fff263d7c7 dix: privates.c more C99 scoped declaration
Signed-off-by: SuperDuperDeou <87223140+SuperDuperDeou@users.noreply.github.com>
2025-07-31 16:57:44 +02:00
SuperDuperDeou
620c9ddf11 dix: grab.c more C99 scoped declaration
Signed-off-by: SuperDuperDeou <87223140+SuperDuperDeou@users.noreply.github.com>
2025-07-31 16:57:44 +02:00
SuperDuperDeou
7764b29365 dix: dixutils.c more C99 scoped declaration
Signed-off-by: SuperDuperDeou <87223140+SuperDuperDeou@users.noreply.github.com>
2025-07-31 16:57:44 +02:00
SuperDuperDeou
952cbeda25 dix: getevents.c more C99 scoped declaration
Signed-off-by: SuperDuperDeou <87223140+SuperDuperDeou@users.noreply.github.com>
2025-07-31 16:57:44 +02:00
SuperDuperDeou
fa6ff96f21 dix: touch.c mode C99 scoped declaration
Signed-off-by: SuperDuperDeou <87223140+SuperDuperDeou@users.noreply.github.com>
2025-07-31 16:57:44 +02:00
SuperDuperDeou
3910a9e0b0 dix: dispatch.c more C99 scoped declaration
Signed-off-by: SuperDuperDeou <87223140+SuperDuperDeou@users.noreply.github.com>
2025-07-31 16:57:44 +02:00
SuperDuperDeou
35d27fd384 dix: resource.c more C99 scoped declaration
Signed-off-by: SuperDuperDeou <87223140+SuperDuperDeou@users.noreply.github.com>
2025-07-31 16:57:44 +02:00
SuperDuperDeou
bdd8a5315c dix: inpututils.c more C99 scoped declaration
Signed-off-by: SuperDuperDeou <87223140+SuperDuperDeou@users.noreply.github.com>
2025-07-31 16:57:44 +02:00
SuperDuperDeou
6410fda821 dix: window.c more C99 scoped declaration
Signed-off-by: SuperDuperDeou <87223140+SuperDuperDeou@users.noreply.github.com>
2025-07-31 16:57:44 +02:00
SuperDuperDeou
20ccf138b3 dix: dixfonts.c more C99 scoped declarations
Signed-off-by: SuperDuperDeou <87223140+SuperDuperDeou@users.noreply.github.com>
2025-07-31 16:57:44 +02:00
SuperDuperDeou
329488e824 dix: events.c mode C99 coped declaration
Signed-off-by: SuperDuperDeou <87223140+SuperDuperDeou@users.noreply.github.com>
2025-07-31 16:57:44 +02:00
SuperDuperDeou
15aced699a dix: devices.c, more C99 scoped declaration
Signed-off-by: SuperDuperDeou <87223140+SuperDuperDeou@users.noreply.github.com>
2025-07-31 16:57:44 +02:00
SuperDuperDeou
ebeb805b70 dix: colormap.c more C99 scoped declaration
Signed-off-by: SuperDuperDeou <87223140+SuperDuperDeou@users.noreply.github.com>
2025-07-31 16:57:44 +02:00
Enrico Weigelt, metux IT consult
c8c52387c5 xv: inline SWriteListImageFormatsReply()
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvListImageFormats ().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 16:57:26 +02:00
Enrico Weigelt, metux IT consult
a3de7f5c57 xv: inline SWriteQueryImageAttributesReply()
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryImageAttributes().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 16:57:26 +02:00
Enrico Weigelt, metux IT consult
9f5b2597e0 xv: inline SWriteQueryPortAttributesReply()
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryPortAttributes().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 16:57:26 +02:00
Enrico Weigelt, metux IT consult
199e049b95 xv: inline SWriteQueryBestSizeReply()
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryBestSize().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 16:57:26 +02:00
Enrico Weigelt, metux IT consult
c744d17e69 xv: inline SWriteGetPortAttributeReply()
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvGetPortAttribute().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 16:57:26 +02:00
Enrico Weigelt, metux IT consult
71713fbf50 xv: inline SWriteGrabPortReply()
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvGrabPort().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 16:57:26 +02:00
Enrico Weigelt, metux IT consult
25565daa42 xv: inline SWriteImageFormatInfo()
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvListImageFormats().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 16:57:26 +02:00
Enrico Weigelt, metux IT consult
26b0ad79ed xv: inline SWriteAttributeInfo()
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryPortAttributes().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 16:57:26 +02:00
Enrico Weigelt, metux IT consult
08d44466a8 xv: inline SWriteFormat()
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryAdaptors().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 16:57:26 +02:00
Enrico Weigelt, metux IT consult
1adc19e10c xv: inline SWriteEncodingInfo()
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryEncodings().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 16:57:26 +02:00
Enrico Weigelt, metux IT consult
73ca100659 xv: inline SWriteAdaptorInfo()
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryAdaptors().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 16:57:26 +02:00
Enrico Weigelt, metux IT consult
3bd75a2fd6 xv: inline SWriteQueryEncodingsReply()
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryEncodings().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 16:57:26 +02:00
Enrico Weigelt, metux IT consult
ef8cf84e6d xv: inline SWriteQueryAdaptorsReply()
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryExtension().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 16:57:26 +02:00
Enrico Weigelt, metux IT consult
875c29c253 xv: inline SWriteQueryExtensionReply()
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryExtension().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 16:57:26 +02:00
Enrico Weigelt, metux IT consult
9c3d48fa24 miext: damage: tolerate NULL pointers in DamageScreenFuncsRec
For now that case doensn't practically happen yet - all fields are at
least assigned to some default/dummy function. But in the future, we
might wanna get rid of dummies.

From now on, video drivers are allowed to assign them to NULL, if they
don't wanna have the default implementations and nothing happening
at all instead (no more need for having their own empty dummies)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 16:36:21 +02:00
Medvidek77
02bba6d9b3 Update meson.build 2025-07-31 16:13:59 +02:00
Medvidek77
e24a13065d Fixed xserver version 2025-07-31 16:13:59 +02:00
Janne Rovio
b1ff69a654 doc: refactor and improve X11 input extension porting documentation
* Removed unnecessary comments (<!-- .LP -->).
* Corrected punctuation and improved sentence structure.
* Ensured consistent capitalization (e.g., "X11" vs "X Server").
* Fixed minor typos and spelling errors.

Signed-off-by: Janne Rovio trollsix10@gmail.com
2025-07-31 16:10:28 +02:00
Enrico Weigelt, metux IT consult
4a073eb318 panoramix: add static protocol struct size asserts
Add compile-time checks on whether sizeof(foo) == SIZEOF(foo),
using new static assert macro.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 15:50:21 +02:00
Enrico Weigelt, metux IT consult
19c21b24ae dix: macro for checking X protocol types
The X protocol types from xorgproto all have corresponding sz_<typename>
defines with their actual network payload size (this can be checked via
SIZEOF() macro).

In theory, this should always be the same as sizeof(), but just to be sure,
adding a macro for a static assert on that.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 15:50:21 +02:00
stefan11111
73e56fd076 glamor: handle if GBM_BO_USE_SCANOUT is not supported
Backport from Xwayland:
https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/433
111d318fc2

See also:
https://forums.developer.nvidia.com/t/gbm-surface-create-fails-if-flags-0/279951
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3304#note_1983279
https://gitlab.freedesktop.org/xorg/xserver/-/issues/1535

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-31 15:48:41 +02:00
stefan11111
e6885d7e8b glamor: use gbm_bo_create_with_modifiers2()
This allows us to pass flags to the function, avoiding the forced
implicit GBM_BO_USE_SCANOUT which happens with the older version.

Backport from Xwayland:
f31ca9238f

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-31 15:48:41 +02:00
stefan11111
bf86850288 glamor: Only use modifier gbm API if explicit
If we're using implicit modifiers, we'll pass NULL and zero modifiers.
Lets just use the legacy API directly instead.

Backport from Xwayland:
08b0ea09de

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-31 15:48:41 +02:00