Commit Graph

21071 Commits

Author SHA1 Message Date
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
stefan11111
0f0b33b5b5 glamor: if glamor_get_modifiers make *num_modifiers 0, make *modifiers NULL
This likely wasn't a problem, as *num_modifiers was 0, so likely no
data was read from a potentially uninitilaized pointer, but it's
still better to explicitly set it to NULL.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-31 15:48:41 +02:00
Enrico Weigelt, metux IT consult
7a4bf5ab10 dbe: ProcDbeGetVisualInfo(): reduce temporary allocations
Since we're now constructing the payload step by step via x_rpcbuf,
there's no need to have an extra loop for collecting dbeScreenVisualInfo's,
we can just fetch and process them one by one, and so don't need extra
temporary storage for them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 15:47:49 +02:00
Enrico Weigelt, metux IT consult
1bcff3fe35 dbe: ProcDbeGetVisualInfo(): drop unncessary payload length computation
Since using x_rpcbuf, we don't need extra computation of the payload_length,
as the x_rpcbuf already knows the amount of data written into it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 15:47:49 +02:00
Enrico Weigelt, metux IT consult
b60c739384 dbe: ProcDbeGetVisualInfo(): use x_rpcbuf for visual info payload assembly
By using the new x_rpcbuf, it's easy to assemble packets step by step,
without even knowing the final size yet and doing the write out in
one step.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 15:47:49 +02:00
Enrico Weigelt, metux IT consult
8c3d608d4e os: xserver_poll: skip defining symbols already defined by mingw
mingw already has struct pollfd and POLL* defines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 15:28:08 +02:00
Enrico Weigelt, metux IT consult
9fdb2482de os: xtrans: drop define of EINPROGRESS
Never used anywhere and conflicts with system headers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 15:24:30 +02:00
Enrico Weigelt, metux IT consult
90d0c2d4a0 os: xtrans: drop unused TRANS_CLOSEONEXEC
Not used anywhere, so no need to keep it around anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 15:23:27 +02:00
Enrico Weigelt, metux IT consult
237e5f5e1e Xnamespace: fix printf patterns
For printing 32bit integers, we need to use PR*32 macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 15:23:05 +02:00
Enrico Weigelt, metux IT consult
d9db02d700 os: ospoll: use stdbool instead of X11's Bool
Low level OS specific code should not depend on higher level protocol
headers. This also removes yet another conflict with win32/mingw headers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 15:22:07 +02:00
Enrico Weigelt, metux IT consult
91d20b0cb9 mi: use %lu instead of %zu in ErrorF() call
mingw doens't support `%zu` printf pattern yet.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 15:21:24 +02:00
Enrico Weigelt, metux IT consult
93f57f68a2 os: xserver_poll: replace own typedef by size_t
No need to have an own typedef here, just use standard size_t.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 14:50:05 +02:00
Enrico Weigelt, metux IT consult
e1b1c2f514 os: ospoll: use realloc() instead of reallocarray()
MacOS doesn't support reallocarray(), and we can't include os.h here
on win32/mingw.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 14:49:23 +02:00
callmetango
23f26bd95e README: mention June 2025 X.Org CVE fixes
Mention the integration of the June 2025 X.org CVE fixes into the XLibre
Xserver. Add a link to our Q&A discussions as well.

Fixes: #522
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-07-31 10:39:04 +02:00