Commit Graph

21299 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
17bf4e677e mi: canonical walkScreen variable on screen list iterations
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 10:52:49 +02:00
Enrico Weigelt, metux IT consult
6730e673d6 Xi: canonical walkScreen variable on screen list iterations
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 10:52:49 +02:00
Enrico Weigelt, metux IT consult
d81cf93329 Xext: canonical walkScreen variable on screen list iterations
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 10:52:49 +02:00
Enrico Weigelt, metux IT consult
e29c0454ce render: canonical walkScreen variable on screen list iterations
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 10:52:49 +02:00
Enrico Weigelt, metux IT consult
44ae54e3c6 xfixes: canonical walkScreen variable on screen list iterations
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 10:52:49 +02:00
Enrico Weigelt, metux IT consult
d8149d9c9e glx: canonical walkScreen variable on screen list iterations
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 10:52:49 +02:00
Enrico Weigelt, metux IT consult
8f39f58f51 dri3: canonical walkScreen variable on screen list iterations
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 10:52:49 +02:00
Enrico Weigelt, metux IT consult
840109488a dbe: canonical walkScreen variable on screen list iterations
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 10:52:49 +02:00
Enrico Weigelt, metux IT consult
4bb89cdcdf damageext: canonical walkScreen variable on screen list iterations
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 10:52:49 +02:00
Enrico Weigelt, metux IT consult
a49f0fd9b2 composite: canonical walkScreen variable on screen list iterations
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 10:52:49 +02:00
Enrico Weigelt, metux IT consult
361b576c48 dix: canonical walkScreen variable on screen list iterations
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 10:52:49 +02:00
Enrico Weigelt, metux IT consult
fd3eaf69a1 .github: notify on merge conflicts in PRs
Add a pipeline that's checking for and notifying on merge conflicts
within open pull requests. It's triggered whenever one of the baseline
branches (eg. master, maint-*, etc) are pushed.

Unfortunately, we don't have any way for rate limiting within a single
PR yet, so on a day with lots of merges, it could become a bit spammy.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-18 10:51:09 +02:00
Enrico Weigelt, metux IT consult
2fddefcf8c dix: use x_rpcbuf_t in ProcListProperties()
Use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-15 19:52:07 +02:00
Enrico Weigelt, metux IT consult
5d8f149a57 dix: fix memory clearing in dix_main()
Clearing of screens and gpuscreens pointer list on teardown has been wrong.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-15 14:27:39 +02:00
Enrico Weigelt, metux IT consult
91bc0ff6b2 dix: use x_rpcbuf_t in ProcGetKeyboardMapping()
Use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-15 13:34:26 +02:00
Enrico Weigelt, metux IT consult
eb04c7a1b3 dix: use x_rpcbuf_t in ProcQueryTree()
Use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-15 12:58:06 +02:00
Enrico Weigelt, metux IT consult
e93dd75dd8 dix: fix int type mismatch on CURSOR_REC_SIZE and CURSOR_BITS_SIZE
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-15 12:55:40 +02:00
Enrico Weigelt, metux IT consult
aac7a9330a dix: use x_rpcbuf_t in ProcGetProperty()
Use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-15 00:04:10 +02:00
Enrico Weigelt, metux IT consult
8a2dfa1aba dix: macro for computing extra units needed for reply header
Add macro X_REPLY_HEADER_UNITS() for computing how many extra
protocol units are needed for a reply header (for .length field)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-14 19:17:39 +02:00
Enrico Weigelt, metux IT consult
a95ae61658 dix: rpcbuf: add rpcbuf_write_INT16()
Just a convenience wrapper for writing an INT16.
Technically it's really the same as CARD16, but we still need a typecast
in order to not getting a compiler warning on int signedness mismatch.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-14 19:00:45 +02:00
Enrico Weigelt, metux IT consult
9b6ff22f1d randr: fix size parameter to WriteToClient()
Size computation needs to be done on the struct actually written.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-14 16:53:10 +02:00
Enrico Weigelt, metux IT consult
6d6f64da55 Xi: fix size parameter to WriteToClient()
Size computation needs to be done on the struct actually written.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-14 16:52:47 +02:00
Enrico Weigelt, metux IT consult
4454a26545 randr: use x_rpcbuf_t in ProcRRGetProviderProperty()
Use x_rpcbuf_t for reply payload assembly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-14 14:19:49 +02:00
stefan11111
828135fd3e dix: Xext: replace bytes_to_int32(pad_to_int32(x)) with bytes_to_int32(x)
bytes_to_int32 already adds padding, no need to compute that too.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-14 12:55:00 +02:00
Enrico Weigelt, metux IT consult
e62e88fd8b xkb: fix padding in XkbWriteModifierMap()
Fixes: 18fe21fe0e
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-14 12:44:26 +02:00
Enrico Weigelt, metux IT consult
e07a939765 dix: rpcbuf: add x_rpcbuf_pad() for padding the buffer
New function for padding the buffer to full protocol units granularity:
If the current write position isn't at 4-byte granularity, it reserves
the remaining number of bytes (ie. writing zeros), in order to make the
next write align to 4-byte granularity again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-14 12:44:26 +02:00
Enrico Weigelt, metux IT consult
02737a1cd4 panoramiX: XineramaGetImageData(): simplify the loop
take way the extra scope / indention on the `if (nbox)` statement and
use `continue` instead.

Hint: for easier review, one can use `git diff -w` in order to suppress
the indention-only changes.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-14 12:12:33 +02:00
Enrico Weigelt, metux IT consult
03928dea4b panoramiX: don't use FOR_NSCREENS_FORWARD_SKIP() anymore
in preparation of upcoming new iterator macros, phase out
FOR_NSCREENS_FORWARD_SKIP, so we don't need an additional macro
for just the case where first screen is skipped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-14 12:10:27 +02:00
Enrico Weigelt, metux IT consult
69452c23ae panoramiX: XineramaGetImageData(): replace walk variable i by walkScreenIdx
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
e4081afa65 panoramiX: XineramaGetImageData(): add walkScreen temp variable
Instead of always accessing the global screens array, do it only once
and put it into a walk variable.

Also prepration for upcoming commits which are moving the looping logic
into a generic macro.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
be425a933c panoramiX: XineramaGetImageData(): scope scratchMem
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
1193e294e7 panoramiX: XineramaGetImageData(): scope sizeNeeded variable
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
03f3388745 panoramiX: XineramaGetImageData(): declarare and init depth in one shot
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
124dee2db0 panoramiX: XineramaGetImageData(): scope ScratchPitch variable
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
79b6f60277 panoramiX: XineramaGetImageData(): scope pBox
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
b9f76047fc panoramiX: XineramaGetImageData(): scope loop variables
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
5e68ea71f6 panoramiX: XineramaGetImageData(): scope temporary dimension variables
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
27f1fcef7f panoramiX: XineramaGetImageData(): scope split pDraw variable usage
Use a separate variable pWalkDraw for inside the loop, as it's got a
different purpose in here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
2f62e660ff panoramiX: XineramaGetImageData(): scope inOut variable
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
dee9b9a5be panoramix: XineramaGetImageData(): scope nbox
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
d9cf1a7a9d panoramiX: XineramaGetImageData(): scope ScreenRegion
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:57:23 +02:00
Enrico Weigelt, metux IT consult
34c3a9c7e2 treewide: fix serverGeneration int type mismatch
The global (exported) serverGeneration field is `unsigned long`, while
many other places copy it and compare it two other integer types, eg.
plain `int` (which is signed). Even if it's unlikely ever reaching such
high number of generations that it will ever make trouble, it's still
a good idea to clean this up and use the same type everywhere.

For clearity, introducing a typedef `x_server_generation_t` which is
used everywhere, instead of raw `unsigned long`.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:52:03 +02:00
Enrico Weigelt, metux IT consult
05d88310bd namespace: fix naming in examples, errors and comments
At some places, there's still the word 'contianer' instead of 'namespace'

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:50:13 +02:00
Enrico Weigelt, metux IT consult
e98a3a5ff4 namespace: allow "namespace" config directive instead of "container"
The namespace config still has the "container" directive, which should have
been named "namespace". It's a leftover from the original working draft that
was named "container extension".

For the time being, keep backwards compatibility by allowing both tokens
"container" as well as "namespace" for the same directive. But consider the
old token as deprecated, it shouldn't be used anymore and might go away
in the near future.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-12 18:51:16 +02:00
Enrico Weigelt, metux IT consult
3af53d474f dix: let CreateGCperDepth() accept ScreenPtr instead of screen id
It's only caller already has the ScreenPtr, so it doesn't make any sense
passing in the screen number and let that function retrieve the pointer
on its own again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-12 11:09:43 +02:00
Enrico Weigelt, metux IT consult
d4fc1506ad dix: let CreateDefaultStipple() accept ScreenPtr instead of screen id
It's only caller already has the ScreenPtr, so it doesn't make any sense
passing in the screen number and let that function retrieve the pointer
on its own again.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-12 11:09:35 +02:00
Enrico Weigelt, metux IT consult
a18524fa5d Xext: shape: fix non-ximerama build
In the non-XINERAMA code path, a parameter was missing.

Fixes: a57db845bb
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-12 11:10:53 +02:00
Enrico Weigelt, metux IT consult
a1c3dcb527 dix: let x_rpcbuf_wsize_units() return CARD32
Practically all callers need to assign to a CARD32 field, so let it
directly compute and return as CARD32.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-12 10:29:01 +02:00
Enrico Weigelt, metux IT consult
d19cfbfa70 randr: ProcRRGetOutputInfo (): simplify by using x_rpcbuf_t
* use x_rpcbuf_t for reply payload assembly and byte-swap
* do byte-swap of header fields explicitly instead of cryptic functions
* drop extra length computation

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:28:45 +02:00
Enrico Weigelt, metux IT consult
946eb68ff3 xkb: ProcXGetDeviceKeyMapping(): use x_rpcbuf_t
Using x_rpcbuf_t for payload assembly and byte swapping.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:26:14 +02:00