aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* util: fix use-after-free in for_each_helperHEADmainYaNing Lu6 days1-3/+5
| | | | | | | | | | | | | | | | | | for_each_helper caches the entries->data pointer and array size before iterating. If a compositor calls wl_client_for_each_resource() and the provided callback triggers the creation of a new client object, the underlying wl_array may be reallocated via realloc(). When this happens, the cached start pointer becomes dangling. Subsequent iterations will read from the freed memory block, causing already-destroyed resources to be destroyed a second time (e.g., leading to a double-free crash in wl_list_remove()). Fix this by dynamically re-fetching entries->data and entries->size on every loop iteration, ensuring the iterator always accesses the valid live array. Signed-off-by: YaNing Lu <luyaning@uniontech.com>
* Send wl_registry.global_remove to global's offer listVlad Zahorodnii11 days1-21/+19
| | | | | | | | Since the globals track the registries that received global announcements, we can use that instead of going through all present registries and duplicate some filtering logic. Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
* Add wl_fixes.ack_global_remove()Vlad Zahorodnii11 days6-40/+511
| | | | | | | | | | | | | | | | | | | | | | | | The wl_global_remove() function was introduce to help mitigate clients getting unintentionally disconnected if a global is added and removed in a short burst. The intended usage was: - the compositor calls wl_global_remove() - after a certain period of time, the compositor calls wl_global_destroy() Unfortunately, it did not fully fix the issue due to the way monotonic clock works on Linux. Specifically, it can tick even during sleep. This change adds a slightly better way to handle global removal. With the proposed changes, the clients need to signal to the compositor that they won't bind the global anymore. After all clients have acknowledged a wl_registry.global_remove, the compositor can finally destroy the global. Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
* build: re-open main branch for regular developmentSimon Ser2026-03-201-1/+1
| | | | Signed-off-by: Simon Ser <contact@emersion.fr>
* ci: upgrade FreeBSD to v14.4Simon Ser2026-03-101-2/+2
| | | | Signed-off-by: Simon Ser <contact@emersion.fr>
* build: bump version to 1.24.91 for the RC1 release1.24.91Simon Ser2026-03-051-1/+1
| | | | Signed-off-by: Simon Ser <contact@emersion.fr>
* server: improve wl_registry.bind error messagesKirill Primak2026-03-051-5/+4
| | | | | | | - Consistently use PRIu32 for global names (uint32_t) - Use expected/got instead of have/wanted (which were used differently anyway) Signed-off-by: Kirill Primak <vyivel@eclair.cafe>
* server: don't disclose the existence of invisible globalsKirill Primak2026-03-051-6/+2
| | | | | | | | Otherwise, a client iterate over a range of names binding with deliberately incorrect interfaces and receive error messages with expected interfaces regardless of global visibility. Signed-off-by: Kirill Primak <vyivel@eclair.cafe>
* scanner: enforce frozen attributeIsaac Freund2026-03-051-0/+17
| | | | Signed-off-by: Isaac Freund <mail@isaacfreund.com>
* doc: add frozen=true interface attributeIsaac Freund2026-03-053-3/+14
| | | | | | | | | | This is useful for scanners that use knowledge of the object creation hierarchy such as zig-wayland [1]. Currently zig-wayland uses a hardcoded list of frozen interfaces. [1]: https://codeberg.org/ifreund/zig-wayland Signed-off-by: Isaac Freund <mail@isaacfreund.com>
* server: improve version mismatch error messageKirill Primak2026-03-051-4/+4
| | | | | | | "1 < 2" is obviously true but not very useful information by itself. Provide a bit more context. Signed-off-by: Kirill Primak <vyivel@eclair.cafe>
* cursor: fix discards 'const' qualifierRudi Heitbaum2026-03-031-1/+1
| | | | | | | | | | Fixes: ../cursor/xcursor.c: In function 'xcursor_next_path': ../cursor/xcursor.c:610:23: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 610 | char *colon = strchr(path, ':'); | ^~~~~~ Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
* Fix typosDiego Viola2026-03-034-4/+4
| | | | Signed-off-by: Diego Viola <diego.viola@gmail.com>
* util: assert alloc is consistent with data in wl_array_add()Simon Ser2026-03-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | struct wl_array may be constructed by users manually from a foreign data pointer: uint32_t states[] = {1, 2, 3}; struct wl_array arr = { .data = states, .size = sizeof(states) / sizeof(states[0]), }; This is useful to avoid the need to allocate when sending Wayland messages. Users need to be careful not to use wl_array_add() on such arrays: the function will misbehave by leaving garbage at the start of the new buffer when reallocating. Add an assert to guard against wl_array_add() calls in this situation, to have a clear crash instead of undefined behavior. Signed-off-by: Simon Ser <contact@emersion.fr>
* protocol: elaborate on drm_fourcc.h and wl_shm.format codesManuel Stoeckl2026-02-281-1/+6
| | | | | | | | | | | Wayland clients should not assume the format list will not grow, or assume the format descriptions in the Wayland protocol are complete. (The latter fact is clear for descriptionless enum entries like XRGB8888_A8; but, for example, the full XRGB16161616F format description explicitly requires IEEE 754 binary16 floats instead of bfloat16 or ARM's alternative half precision variant.) Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
* tests: Add test for using a proxy with a destroyed queue as a factoryAlexandros Frantzis2026-03-011-0/+55
| | | | Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
* client: fix crash when creating proxies with no queueLoïc Yhuel2026-03-011-3/+12
| | | | | | | | | | Before, it worked if the client did set a queue on the proxy before any event was received. Now we have the "warning: queue xxx destroyed while proxies still attached", then a crash if one of the proxies is used to create a proxy. Fixes: 674145dc3f ("client: Track the proxies attached to a queue") Fixes: 0ba650202e ("client: Warn when a queue is destroyed with attached proxies") Signed-off-by: Loïc Yhuel <loic.yhuel@softathome.com>
* protocol: add wl_data_device_manager destructorsJulian Orth2026-02-281-4/+13
| | | | Signed-off-by: Julian Orth <ju.orth@gmail.com>
* protocol: add wl_compositor destructorJulian Orth2026-02-281-1/+9
| | | | Signed-off-by: Julian Orth <ju.orth@gmail.com>
* protocol: fix wl_region versionJulian Orth2026-02-281-1/+1
| | | | | | | wl_region is not a frozen interface and therefore should have the version of the parent object, wl_compositor. Signed-off-by: Julian Orth <ju.orth@gmail.com>
* protocol: introduce wl_surface.get_releaseSimon Ser2026-02-281-5/+34
| | | | | | | | | | | | | | This new request allows clients to get per-surface-commit buffer release events. It supersedes wl_buffer.release. This functionality is also available via the linux-explicit-synchronization protocol, but requires the compositor to also support Linux synchronization fences. Adding this new request to the core protocol allows any compositor to implement the functionality. Signed-off-by: Simon Ser <contact@emersion.fr> Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/203 References: https://gitlab.freedesktop.org/wayland/wayland/-/issues/46
* doc: fix cname-(suffix-)requirementsIsaac Freund2026-02-241-8/+20
| | | | | | | These used to be macro-like xml things that expanded to the text this commit replaces them with. Signed-off-by: Isaac Freund <mail@isaacfreund.com>
* doc: restore missing image files in docbookJulian Orth2026-02-123-0/+31
| | | | Signed-off-by: Julian Orth <ju.orth@gmail.com>
* doc: turn captions into third-level headers in bookJulian Orth2026-02-121-81/+81
| | | | Signed-off-by: Julian Orth <ju.orth@gmail.com>
* doc: reword docbook foreword to capture new scopeJulian Orth2026-02-121-2/+1
| | | | Signed-off-by: Julian Orth <ju.orth@gmail.com>
* doc: remove most content from docbookJulian Orth2026-02-1249-6284/+0
| | | | Signed-off-by: Julian Orth <ju.orth@gmail.com>
* doc: link to website in doxygenJulian Orth2026-02-121-2/+2
| | | | Signed-off-by: Julian Orth <ju.orth@gmail.com>
* doc: add meson.build for bookJulian Orth2026-02-123-2/+62
| | | | Signed-off-by: Julian Orth <ju.orth@gmail.com>
* doc: rewrite the book forewordJulian Orth2026-02-121-4/+56
| | | | Signed-off-by: Julian Orth <ju.orth@gmail.com>
* doc: copy images to mdbookJulian Orth2026-02-1240-0/+3254
| | | | Signed-off-by: Julian Orth <ju.orth@gmail.com>
* doc: add copyright notice to mdbookJulian Orth2026-02-051-0/+23
| | | | Signed-off-by: Julian Orth <ju.orth@gmail.com>
* doc: remove docbook -> mdbook conversion toolJulian Orth2026-02-055-1133/+0
| | | | Signed-off-by: Julian Orth <ju.orth@gmail.com>
* doc: run docbook -> mdbook conversion toolJulian Orth2026-02-0512-0/+1695
| | | | | | | To reproduce this commit, delete the contents of the src directory and run the tool. Signed-off-by: Julian Orth <ju.orth@gmail.com>
* doc: add docbook -> mdbook conversion toolJulian Orth2026-02-055-0/+1133
| | | | Signed-off-by: Julian Orth <ju.orth@gmail.com>
* doc: make DocBook validation optionalPekka Paalanen2026-02-043-2/+11
| | | | | | | | | | | | It turns out that changes in the building environment, the version of Doxygen being a prime suspect, can break the validation. Invalid DocBook XML does lead to likely broken documentation, but perhaps it is better than failing to build or having to disable documentation completely. CI turns DocBook validation on, because the CI environment is stable and known, and we do want to catch mistakes in hand-written DocBook files. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
* fix .git-blame-ignore-revs revisionJulian Orth2026-02-021-1/+1
| | | | | | The commit hash was changed during merge. Signed-off-by: Julian Orth <ju.orth@gmail.com>
* add .git-blame-ignore-revs fileJulian Orth2026-02-022-0/+5
| | | | | | | | This can be used with git config blame.ignoreRevsFile .git-blame-ignore-revs Signed-off-by: Julian Orth <ju.orth@gmail.com>
* protocol: reindent wayland.xmlJulian Orth2026-02-021-1387/+1387
| | | | | | | | | | The file used a mixture of tabs and spaces. According to .editorconfig, all xml files should be indented with spaces, so this seems like the correct choice if we wanted to reindent the file. I used vim's :retab command to expand all tabs to 8 spaces. Signed-off-by: Julian Orth <ju.orth@gmail.com>
* doc: update GPU buffer exchange sectionJulian Orth2026-01-292-50/+99
| | | | | | Finally, a buffer exchange mechanism for the 21st century. Signed-off-by: Julian Orth <ju.orth@gmail.com>
* doc/css: adjust code and userinput stylesPekka Paalanen2026-01-221-1/+9
| | | | | | | | | | | | | | | | | | | I don't know why <code> was defined to be bold, it looks bad to me. The same with <synopsis> which would inherit bold from <dt> when used inside a variablelist term. So, to make the code snippets look better, force them to use normal weight. <userinput> should differentiate from normal code somehow, and italic seems fine for it. <literal> already has bold, and I think it's fine, so no need to touch it. These changes are mainly for the new XML dialect documentation chapter. I didn't notice anything changing for the older or generated parts of the docs. Signed-off-by: Pekka Paalanen <pq@iki.fi>
* doc: document the Wayland XML dialectPekka Paalanen2026-01-223-0/+930
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document the XML tags used to describe Wayland protocols. Previously we only had the informal specification in the Protocol chapter, and the DTD. Better late than never. I have looked into wayland-scanner and libwayland for various limitations documented here possibly for the first time. I have also forbid things that are not in use or are known broken, including unspecified interface for a new_id in an event, or an object argument with an unspecified interface. I did investigate writing a RELAX NG compact schema for Wayland and documenting everything there, then generating DocBook XML from it. However, it seems generating documentation from schema is actually really complicated. I found these tools: - xs3p stylesheet: website looks dead, though Sourceforge still has it. Produces XHTML, not DocBook. Has an unfamiliar license. - xsddoc: the authors wrote that XSLT is not really sufficient, so they abandoned this approach and went for Java to create xnsdoc. - xnsdoc: seems to be proprietary licensed, although one could ask for a free license for a FLOSS project. All in all, it seems to be much easier to just write the documentation in DocBook, copying the strcture from the DTD manually, than to generate it. It's not doing to change often, anyway. It also allowed me to leverage DocBook syntax in full. Signed-off-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
* doc: fix a root element validation errorPekka Paalanen2026-01-221-1/+1
| | | | | | | | | | | Once I got XML validation working in VSCode, it found an error: Document root element "preface", must match DOCTYPE root "chapter". I guess DOCTYPE declares which element is used as root in the file. Signed-off-by: Pekka Paalanen <pq@iki.fi>
* editorconfig: follow wayland-protocols XML stylePekka Paalanen2026-01-221-6/+1
| | | | | | | | | It's unlikely that protocols/wayland.xml sees much change anymore, but files in doc/ might. To make writing documentation easier, stick to an unsurprising indentation style that is already in use in wayland-protocols and for the XSL files. Signed-off-by: Pekka Paalanen <pq@iki.fi>
* doc: Add a chapter on content updatesSebastian Wick2026-01-2238-0/+3645
| | | | | | | | | The behavior of content updates, specifically in combination with sync subsrufaces and constrains can become quite complicated. This introduces a chapter in the wayland book which explains the behavior of the core specification in this regard, and shows examples. Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
* protocol: Define Content Update behaviorSebastian Wick2026-01-221-69/+64
| | | | | | | | | | | | | | | | | | | The protocol currently is in a state where we define that commits create content updates and they are queued up until they are applied, and the old view that commit applies the state or caches it in the parent state. This commit moves the protocol completely to the new model which retains the old behavior when no constraints are being used but allows for constraints to be used to hold back a group of synchronized content updates. To convince yourself that this indeed retains the original behavior I suggest to play around with a few examples and look at the resulting graphs, as is done here: https://gitlab.freedesktop.org/wayland/wayland/-/issues/457#note_2403135 Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
* doc: drop non-existing refs from CSSPekka Paalanen2026-01-211-31/+4
| | | | | | | | | | | | | | | It seems these images were never in the repository. They might have existed when the documentation was still built with Publican, but since the migration to xmlto I think these have all been just 404. Removing div.warning:before, div.note:before and div.important:before would actually delete some unexpected empty space if the Docbook <warning>, <note> or <important> elements were used. They are not used now, but may be in the future. .draft is never used, so I replaced the image with whatever. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
* doc: remove unused CSS filesPekka Paalanen2026-01-214-147/+0
| | | | | | I could not find them referenced anywhere. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
* doc: remove Revision_History.xmlPekka Paalanen2026-01-202-8/+0
| | | | | | This was never used. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
* doc: remove Preface.xmlPekka Paalanen2026-01-203-22/+0
| | | | | | This was never filled out, so might as well just delete it. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
* ci: install to prefix after building in DebianSimon Ser2026-01-131-0/+1
| | | | | | | | | | Artifacts include the prefix directory, but it was empty: we weren't running the install step. Run it to align Debian with FreeBSD. This allows reviewers to check the HTML documentation output. Signed-off-by: Simon Ser <contact@emersion.fr>