-
1d5772b7
by Simon Ser at 2024-05-30T21:07:24+02:00
build: re-open main branch for regular development
Signed-off-by: Simon Ser <contact@emersion.fr>
-
caaa308c
by Simon Ser at 2024-07-09T18:22:10+02:00
scanner: extract validator function emission to helper function
This function will grow in the next commit.
Signed-off-by: Simon Ser <contact@emersion.fr>
-
c669d992
by Simon Ser at 2024-07-09T18:22:10+02:00
scanner: fix validator for bitfields
Bitfields are valid if the value only contains bits inside of
the supported entries for the given version.
Signed-off-by: Simon Ser <contact@emersion.fr>
-
fa1811ce
by Simon Ser at 2024-07-09T18:22:10+02:00
tests: add enum bitfield test
Signed-off-by: Simon Ser <contact@emersion.fr>
-
0cecde30
by meltq at 2024-07-11T17:44:04+00:00
src: switch asserts to wl_abort
assert()s can be compiled away by #defining NDEBUG. Some build systems
do this. Using wl_abort gives a human readable error message and it
isn't compiled away. This commit closes issue #230.
Signed-off-by: meltq <tejasvipin76@gmail.com>
-
f6f0a3cd
by Sebastian Wick at 2024-07-26T18:33:28+02:00
client: Handle proxies with no queue
wl_proxy_get_queue can return NULL if the queue of the proxy was already
destroyed with wl_event_queue_destroy. In this case, the queue also has
no name anymore.
Fixes: b42218f ("client: Allow setting names for queues")
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
-
a6a4e081
by Kirill Primak at 2024-08-09T20:25:11+00:00
Put WL_DEPRECATED in front of the function declarations
This fixes the following clang error when using C23:
../src/wayland-server-core.h:680:41: error: 'deprecated' attribute cannot be applied to types
680 | int32_t stride, uint32_t format) WL_DEPRECATED;
| ^
../src/wayland-util.h:52:25: note: expanded from macro 'WL_DEPRECATED'
52 | #define WL_DEPRECATED [[deprecated]]
| ^
Signed-off-by: Kirill Primak <vyivel@eclair.cafe>
-
64248963
by Kirill Primak at 2024-08-09T20:29:24+00:00
server: add wl_resource_post_error() docs
Signed-off-by: Kirill Primak <vyivel@eclair.cafe>
-
65454cf7
by Kirill Primak at 2024-08-09T20:29:24+00:00
server: expose wl_resource_post_error_vargs()
Signed-off-by: Kirill Primak <vyivel@eclair.cafe>
-
2bbd80c8
by Sebastian Wick at 2024-08-09T20:33:05+00:00
doc: Require strings to be UTF-8
Nothing checks this yet but this gives us the opportunity to do so when
we want.
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
-
58bb6c72
by Derek Foreman at 2024-08-09T20:38:52+00:00
src: Finish assert() clean-up
>From cleanup commit 0cecde304:
assert()s can be compiled away by #defining NDEBUG. Some build systems
do this. Using wl_abort gives a human readable error message and it
isn't compiled away.
That commit missed one final assert, presumably due to missing it with
grep because of a coding style issue. Fix that up, and remove inclusion
of <assert.h> as appropriate.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
-
efa64805
by Simon Ser at 2024-08-09T20:46:58+00:00
ci: use detached MR pipelines
See the freedesktop wiki [1]. This allows external contributors to
have CI run properly.
[1]: https://gitlab.freedesktop.org/freedesktop/freedesktop/-/wikis/GitLab-CI#for-project-developers
Signed-off-by: Simon Ser <contact@emersion.fr>
-
5b692b50
by Fangzhou Ge at 2024-08-12T15:49:14-04:00
client: Log the object and methods when marshalling or sending fails
The log that appears before a display_error can be captured as crash
signature. Useful to know what it is.
This is cherry-picked from chromium https://crrev.com/c/4697877
Signed-off-by: Fangzhou Ge <fangzhoug@chromium.org>
-
0239b082
by Joaquim Monteiro at 2024-08-15T14:13:57+01:00
meson: Fix use of install_data() without specifying install_dir
This was broken (when in a subproject) before Meson 1.3.0, and so
Meson warns against this unless the project targets 1.3.0 or newer.
Signed-off-by: Joaquim Monteiro <joaquim.monteiro@protonmail.com>
-
6c4a6950
by Demi Marie Obenour at 2024-08-18T17:08:56+00:00
connection: Reject strings containing NUL bytes
libwayland cannot construct these messages as it uses strlen() to
determine string lengths. libwayland is also guaranteed to misinterpret
these messages, since message handlers only get a pointer and no length.
Therefore, reject strings containing NUL bytes.
Also remove a redundant check from the unmarshalling code. The
zero-length case has already been checked for.
Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
-
7c6259e9
by Julian Orth at 2024-09-10T07:36:48+00:00
protocol: clients should not emulate key-press events on enter
The previous change introducing the logical state caused some confusion.
Clarify that most application should not use the list of pressed keys.
Signed-off-by: Julian Orth <ju.orth@gmail.com>
-
1b0d45e9
by Andri Yngvason at 2024-09-23T15:23:45+00:00
Add wl_keyboard key repeat events
This allows the compositor to take over the responsibility of repeating
keys.
Signed-off-by: Andri Yngvason <andri@yngvason.is>
-
38f91fe6
by Simon Ser at 2024-10-05T14:06:51+00:00
protocol: document that wl_surface.offset is role-specific
This request doesn't make sense for all surface roles. For instance,
for maximized/tiled/fullscreen xdg_toplevel, for xdg_popup, for
layer-shell surfaces, etc.
Signed-off-by: Simon Ser <contact@emersion.fr>
-
f67db75e
by YaoBing Xiao at 2024-10-18T16:49:45+08:00
cursor: add check to ensure wl_shm_create_pool succeeded
Signed-off-by: YaoBing Xiao <xiaoyaobing@uniontech.com>
-
10df74c2
by Julian Orth at 2024-11-18T09:25:20+00:00
protocol: add wl_fixes interface
This commit describes a new wl_fixes interface that can be used to
destroy wl_registry objects.
Users of libwayland-client should use it as follows:
- call wl_fixes_destroy_registry(registry)
- call wl_registry_destroy(registry)
Users of libwayland-server should, in their implementation of the
request, call wl_resource_destroy(registry).
It should be similar in other protocol implementations.
Signed-off-by: Julian Orth <ju.orth@gmail.com>
-
4273a5ed
by Demi Marie Obenour at 2024-11-29T19:19:45-05:00
connection: Avoid undefined pointer arithmetic
Creating a pointer that is more than one element past the end of an
array is undefined behavior, even if the pointer is not dereferenced.
Avoid this undefined behavior by using `p >= end` instead of
`p + 1 > end` and `SOMETHING > end - p` instead of
`p + SOMETHING > end`.
Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
-
290c36bc
by Demi Marie Obenour at 2024-11-30T11:31:36-05:00
tests: Avoid calling function with wrong type
Calling a function with the wrong type is immediate undefined behavior,
even if the ABI says it should be harmless. UBSAN picks it up
immediately, and any decent control-flow integrity mechanism will as
well.
Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
-
9cb3d7aa
by Demi Marie Obenour at 2024-11-30T16:02:55-05:00
connection: Fix wrong format string
Prevents undefined behavior if there is not enough space in the buffer
for a queued message.
Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
-
f246e619
by Haihua Hu at 2025-01-09T09:58:32+09:00
util: reduce error of wl_fixed_from_double()
when cast double to fixed pointer, there will be big
error, eg 1919.9998 to 1919. Call round before cast
to get nearest value 1920 of 1919.9998
Signed-off-by: Haihua Hu <jared.hu@nxp.com>
-
597a6b94
by Daniel Stone at 2025-01-21T16:43:45+00:00
ci: Update ci-templates
This includes an explicit way to specify the container architecture,
which fixes our rebuilds on ARMv7.
Signed-off-by: Daniel Stone <daniels@collabora.com>
-
bdba21ec
by Sebastian Wick at 2025-01-22T14:28:50+00:00
server: add const qualifier to function arguments where possible
Makes it possible to e.g. `call wl_client_get_credentials` with a `const
struct wl_client *` from a global filter callback.
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
-
37469d5c
by Sebastian Wick at 2025-02-04T14:09:51+00:00
timespec: Pull in timespec.h from weston
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
-
9d5de606
by Sebastian Wick at 2025-02-04T14:09:51+00:00
timespec: Pull in timespec_after and timespec_add from mesa
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
-
893e4fc4
by Sebastian Wick at 2025-02-04T14:09:51+00:00
timespec: Implement saturating timespec substraction
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
-
ff8b8855
by Sebastian Wick at 2025-02-04T14:09:51+00:00
event-loop: Use timespec utils instead of hand-rolling our own
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
-
ddd348da
by Sebastian Wick at 2025-02-04T14:09:51+00:00
client: Add wl_display_dispatch_queue_timeout
For dispatching messages on a queue with a timeout.
This slightly changes the samantics of wl_display_dispatch. Previously
it was possible for it to return even though there wasn't a single
dispatched event. The function correctly returned 0 in this case but it
is now used to indicate a timeout.
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
-
00dcf6b3
by Sebastian Wick at 2025-02-04T14:09:51+00:00
client: Add wl_display_dispatch_timeout
A variant of wl_display_dispatch_queue_timeout for the default queue.
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
-
74f322c3
by Sebastian Wick at 2025-02-04T14:09:51+00:00
tests: Add dispatch timeout tests
Add tests which verify that...
* wl_display_dispatch_timeout with a big enough timeout behaves the same
as wl_display_dispatch
* wl_display_dispatch_timeout will time out when there are no messages
to dispatch
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
-
02ad102e
by Daniel Stone at 2025-02-05T06:52:53+00:00
build: Add -lm to pkg-config dependencies
Now that wl_fixed_from_double() calls round() from a function declared
in a header, our users need to explicitly pick that dependency up in
order to avoid build errors.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Closes: wayland/weston#991
-
7c2ffb0d
by David Redondo at 2025-02-05T09:21:43+01:00
Make wayland-util.h -Wundef safe when compiled by a C++ compiler
Fixes #522
Signed-off-by: David Redondo <kde@david-redondo.de>
-
afd498b6
by David Redondo at 2025-02-05T09:43:21+01:00
Also use [[deprecated]] when compiling with at least C++14
Signed-off-by: David Redondo <kde@david-redondo.de>
-
1ab6b693
by Vlad Zahorodnii at 2025-02-06T10:18:17+00:00
Forward declarate timespec struct
The `timespec` struct is defined in `time.h` header but only if
`_POSIX_C_SOURCE` is set or when using the C11 standard.
Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
-
f732f2bb
by Dylan Aïssi at 2025-02-19T21:31:50+01:00
Add myself to Uploaders
Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>
-
459d82db
by Dylan Aïssi at 2025-02-19T21:41:42+01:00
Make build time tests non-fatal on hppa because sanity-test still fails
Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>
-
292c9ac7
by Dylan Aïssi at 2025-02-19T21:47:14+01:00
Release wayland version 1.23.1-3
Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>
-
528e94ea
by Dylan Aïssi at 2025-02-19T22:04:15+01:00
Revert "Remove two files not in the 1.0.2 tarball"
This reverts commit 3a377bf63c6fc48d2ca67d40d6a585036bb898d0.
This has been fixed a long time ago with 0371668d.
But those two files were never added back in the branch
debian-unstable.
Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>
-
da82d2b9
by Bryce Harrington at 2025-02-19T22:12:23+01:00
cursor: Update boilerplate from MIT X11 license to MIT Expat license
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
5dc9a184
by Bryce Harrington at 2025-02-19T22:12:57+01:00
cursor: Update printed license from MIT "X11" to MIT "Expat"
The code generates a cursor-data.h file, with licensing information.
Change this from the MIT "X11" license to MIT "Expat" license for
consistency with the rest of Wayland.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
b910f676
by ganjing at 2025-02-19T22:13:22+01:00
cursor/convert_font.c: malloc cannot guarantee that the memory allocated is always successful
-
19d971c2
by Dylan Aïssi at 2025-02-19T22:29:43+01:00
debian/watch: rely on gitlab releases instead of releases.html which tends to be outdated
Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>
-
dbfa8d78
by Simon Ser at 2025-02-23T23:38:15+01:00
scanner: use separate guards for validator functions
Generated XXX_is_valid() functions for enums are guarded behind the
same #define as the enum itself. This worked fine until recently,
but since fbd7460737c9 ("scanner: add new enum-header mode") we're
also generating enum-only headers.
When including the enum-only header first, and then the server
header, the validator functions are missing.
Define a separate guard to fix this.
Signed-off-by: Simon Ser <contact@emersion.fr>
-
7033e748
by Julian Orth at 2025-03-15T23:07:39+00:00
client: document get_listener behavior for dispatchers
This seems to have been the case since 2013.
This is useful for wrappers that need two pointers to identify proxies.
One pointer (stored in the user data) pointing to a singleton object to
identify that the proxy has a known structure. And one pointer (stored
in the dispatcher data) pointing to per-proxy data.
Signed-off-by: Julian Orth <ju.orth@gmail.com>
-
6137c8c2
by Michel Dänzer at 2025-03-15T23:12:07+00:00
protocol: Clarify wl_buffer.release description
Sebastian pointed out that the existing text could be read as
wl_buffer.destroy not being allowed before the wl_buffer.release event
arrives, contrary to what the wl_surface.attach description says.
Clarify to be consistent with the latter.
This is a follow-up for
https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/141 .
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
v2:
* Simplify clarification, don't talk about callbacks. (Julian Orth)
* Add reference to details in the description of wl_surface.attach.
(Daniel Stone)
v3:
* Tweak clarification again. (Sebastian Wick)
v4:
* Make clarification even less ambiguous. (Simon Ser, Julian Orth)
v5:
* Just refer to the description of wl_surface.attach instead of trying
to clarify anything here. (Sebastian Wick)
-
9ec01ab2
by Sebastian Wick at 2025-05-20T21:30:56+02:00
shm: Linkify wl_shm_pool_unref in the ref_pool documentation
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
-
af453f87
by Sebastian Wick at 2025-05-20T21:50:09+02:00
shm: Remove refcount check which cannot be triggered
If the pool refcount reaches zero, it is freed, so accessing its members
is UB which ASan would catch.
Also simplify check for negative refcounts.
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
-
9367c4da
by Sebastian Wick at 2025-05-20T21:50:22+02:00
shm: Add wl_shm_buffer ref and unref functions
Shared memory buffers are currently tied to the lifetime of their
underlying wl_buffer resource. This becomes problematic when the client
destroys the resource after committing new state which references the
wl_buffer because a compositor might have to defer applying the commit.
This commit adds methods to keep the wl_shm_buffer alive longer than the
underlying resource. This implicitly also keeps the buffer pool alive
and because the wl_shm_buffer uses offsets into the pool, it even works
when the underlying storage gets remapped somewhere else, which can
happen when the client resizes the pool.
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
-
d2a3d330
by Sebastian Wick at 2025-05-20T21:50:22+02:00
shm: Generate an error when shm access failed even without a resource
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
-
9dd1b2d7
by Simon Ser at 2025-05-20T20:14:52+00:00
shm: fix comment about wl_shm_buffer_begin_access() safety
The paragraph later says that accessing different buffers is
allowed. The function checks whether the same pool is accessed.
Signed-off-by: Simon Ser <contact@emersion.fr>
-
66fc3f00
by Simon Ser at 2025-05-20T20:14:52+00:00
shm: linkify function references in docs
Parentheses make it so the generated HTML documentation contains
links, which makes navigation easier.
Signed-off-by: Simon Ser <contact@emersion.fr>
-
3214f858
by David Edmundson at 2025-05-20T20:20:13+00:00
protocol: Clarify sending of wl_seat.capabilities
It wasn't explicitly stated that wl_seat.capabilities should also
be sent on bind. Everyone did because it was obviously sensible.
This also clarifies that static seat name should be sent before
announcing capabilities so clients can associate these devices with the
right seat name.
Signed-off-by: David Edmundson <davidedmundson@kde.org>
-
44972321
by Isaac Freund at 2025-05-20T20:31:16+00:00
client: add wl_proxy_get_interface()
This is useful for the wayland bindings/scanner I'm working on for a
dynamically typed language.
Signed-off-by: Isaac Freund <mail@isaacfreund.com>
-
8cad6f7b
by Isaac Freund at 2025-05-20T20:31:16+00:00
server: add wl_resource_get_interface()
This is useful for the wayland bindings/scanner I'm working on for a
dynamically typed language.
Signed-off-by: Isaac Freund <mail@isaacfreund.com>
-
cc06c382
by Tobias Stoeckmann at 2025-05-20T20:49:32+00:00
Fix typos
Typos found with codespell and during code audit.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
-
9b169ff9
by Simon Ser at 2025-05-20T20:57:52+00:00
protocol: drop reference to linux-explicit-synchronization
This protocol has been superseded. Replace this outdated reference
with a generic hint that protocol extensions may provide this
functionality.
Signed-off-by: Simon Ser <contact@emersion.fr>
-
62cd0990
by Simon Ser at 2025-05-22T21:00:30+02:00
build: bump version to 1.23.90 for the RC1 release
Signed-off-by: Simon Ser <contact@emersion.fr>
-
b26180df
by Caitlyn Stewart at 2025-06-08T20:53:38+02:00
connection: fix segfault in wl_closure_invoke()
Signed-off-by: Caitlyn Stewart <caitlynrosestewart@gmail.com>
(cherry picked from commit 827d0c30adc4519fafa7a9c725ff355b1d4fa3bd)
-
504dbf23
by Kirill Primak at 2025-06-08T20:55:02+02:00
client: fix conversion specifier in the discarded event log message
Signed-off-by: Kirill Primak <vyivel@eclair.cafe>
(cherry picked from commit 6281ccbd3d98ef0a6503425e3e7d705e3075e265)
-
cd566cd2
by Tobias Stoeckmann at 2025-06-08T20:56:31+02:00
cursor: Fix undefined behavior with huge names
If an index.theme contains a theme name which gets close to INT_MAX,
then creation of full path can lead to a signed integer overflow,
which is undefined behavior.
Fix this by turning one of the values to size_t. Easy solution for a
probably never occurring issue.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
(cherry picked from commit 1bee7aa4a7d6590f882a61a29da16316ba27c600)
-
98d7bbee
by Tobias Stoeckmann at 2025-06-08T20:56:31+02:00
cursor: Gracefully handle out of memory condition
If the full path could not be constructed, avoid calling opendir(NULL)
which, depending on library, might trigger undefined behavior.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
(cherry picked from commit ce0ac4f29e720688ea94fbe412a0b332304d8ee6)
-
65ce8920
by Tobias Stoeckmann at 2025-06-08T20:56:31+02:00
cursor: Gracefully handle huge cursor files
If cursor files require more than INT_MAX bytes, it is possible to
trigger out of boundary writes.
Since these sizes are most likely not desired anyway, gracefully
handle these situations like out of memory errors.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
(cherry picked from commit 5c2f31d8d6e5f24962300f4608a0d6f887ca3bea)
-
86cfd575
by Tobias Stoeckmann at 2025-06-08T20:56:31+02:00
cursor: Ignore invalid cursor files
The header offset must not be smaller than file header length.
Ignore such invalid files.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
(cherry picked from commit 2978fd701a6987668a4ff41f9434f6c0da705596)
-
832c7be7
by Tobias Stoeckmann at 2025-06-08T20:56:31+02:00
cursor: Properly check realloc for errors
Do not override realloc's input pointer before checking for errors,
otherwise it's not possible to keep old value, as intended.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
(cherry picked from commit 0de833da296e59e2495738afc450d1d3cb0314b3)
-
1d6fba98
by Matt Turner at 2025-06-08T20:56:31+02:00
tests: Make `tests` dict elements dicts themselves
Previously each value was a list of extra sources. The next commit will add an
additional field to each test, so they need to be dicts themselves.
Signed-off-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit ca83185e8a28017ff3a2f9edccaa5d35bb86f1d7)
-
a834596d
by Matt Turner at 2025-06-08T20:56:31+02:00
tests: Add support for specifying runtime dependencies
Signed-off-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 6c1da920185955f7c86af38787c8889203ec3fcb)
-
9099588d
by Matt Turner at 2025-06-08T20:56:31+02:00
tests: Depend on exec-fd-leak-checker
Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/514
Signed-off-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit fdac631d1744d50e6e470bb78bf5057664967e32)
-
081f8af1
by Matt Turner at 2025-06-08T20:56:31+02:00
egl: Make `wayland-egl symbols check` depend on `wayland_egl`
Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/515
Signed-off-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 53fbc2b0c1dc70b3a96740ab0ceff6a9fe09b940)
-
e35f1efb
by Simon Ser at 2025-06-08T20:57:05+02:00
build: bump version to 1.23.92
Signed-off-by: Simon Ser <contact@emersion.fr>
-
398e1297
by Demi Marie Obenour at 2025-06-21T13:42:05+02:00
connection: Do not busy-loop if a message exceeds the buffer size
If the length of a message exceeds the maximum length of the buffer, the
buffer size will reach its maximum value and stay there forever, with no
message ever being successfully processed. Since libwayland uses
level-triggered epoll, this will cause the compositor to loop forever
and consume CPU time. In libwayland 1.22 and below, there was an
explicit check that caused messages exceeding 4096 bytes to result in an
EOVERFLOW error, preventing the loop. However, this check was removed
between d074d5290263 ("connection: Dynamically resize connection buffers").
To prevent this problem, always limit the size of messages to 4096 bytes.
Since the default and minimum buffer size is 4096 bytes, this ensures
that a single message will always fit in the buffer. It would be
possible to allow larger messages if the buffer size was larger, but the
maximum size of a message should not depend on the buffer size chosen by
the compositor.
Rejecting messages that exceed 4092 bytes seems to have the advantage of
reserving 4 bits, not 3, in the size field for future use. However,
message sizes in the range [0x0, 0x7] are invalid, so one can obtain a
fourth bit by negating the meaning of bit 12 if bits 0 through 11
(inclusive) are 0. Allowing 4096-byte messages provides the far more
important advantage that regressions compared to 1.22 are impossible
and regressions compared to 1.23 are extremely unlikely. The only case
where a regression is possible is:
- The receiving side is using libwayland 1.23.
- The sending side is either using libwayland 1.23 or is not using
libwayland.
- The sender sends a message exceeding 4096 bytes.
- If the sender of the large message is the client, the server has
increased the buffer size from the default value.
This combination is considered extremely unlikely, as libwayland 1.22
and below would disconnect upon receiving such a large message.
4096-byte messages, however, have always worked, so there was no reason
to avoid sending them.
Fixes: d074d5290263 ("connection: Dynamically resize connection buffers").
Fixes: #494
Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
(cherry picked from commit adf84614ca6189fa4efc522408ffbbc4b27ae497)
-
0fa6f267
by Simon Ser at 2025-06-21T13:46:19+02:00
build: bump version to 1.23.93
Signed-off-by: Simon Ser <contact@emersion.fr>
-
736d12ac
by Simon Ser at 2025-07-06T14:11:26+02:00
build: bump version to 1.24.0
-
dabc08d5
by Dylan Aïssi at 2025-07-28T17:46:47+02:00
Merge tag '1.24.0' into upstream-experimental
1.24.0
-
5bf93f5a
by Dylan Aïssi at 2025-07-28T17:47:25+02:00
Merge branch 'upstream-experimental' into debian-experimental
-
7509b4b2
by Dylan Aïssi at 2025-07-28T17:50:31+02:00
Bump debian/changelog
Signed-off-by: Dylan Aïssi <daissi@debian.org>
-
23695c6a
by Dylan Aïssi at 2025-07-28T18:01:28+02:00
Update symbols file