- Jun 09, 2022
-
-
Simon Ser authored
Signed-off-by: Simon Ser <contact@emersion.fr>
-
Assignments to a wl_proxy's queue member are currently not synchronized with potential reads of that member during event reading/queuing. Assuming atomic pointer value reads and writes (which is a reasonable assumption), and using the documented best practices to handle event queue changes, a queue change should still be safe to perform. That being said, such implicitly atomic accesses are difficult to assess for correctness, especially since they do not introduce memory barriers. To make the code more obviously correct, and handle any potential races we are not currently aware of, this commit updates wl_proxy_set_queue() to set the proxy's event queue under the display lock (all other proxy queue accesses are already done under the display lock). Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
Document the proper way to deal with event queue changes, in order to guarantee proper handing of all events which were queued before the queue change takes effect, especially in multi-threaded setups. Make a special note about queue changes of newly created proxies, which require the use of a proxy wrapper for thread safety. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
The [spec][1] reads: > All paths set in these environment variables must be absolute. If an > implementation encounters a relative path in any of these variables it should > consider the path invalid and ignore it. and > If $XDG_DATA_HOME is either not set or empty, a default equal to > $HOME/.local/share should be used. Testing that the path is absolute also entails that is is non-empty. [1]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
-
- Jun 04, 2022
-
-
Simon Ser authored
Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
These functions don't perform bounds checking, so they are easy to misuse and complicate audits. Signed-off-by: Simon Ser <contact@emersion.fr>
-
- May 27, 2022
-
-
Simon Ser authored
Per code style, declarations need to be at the start of the block. And make l const while at it. Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Just use snprintf instead. It doesn't really matter if we have some duplicate slashes in filenames. Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
- Use early returns - De-duplicate XDG_DATA_HOME code-paths - Don't crash on allocation failure - Use size_t when appropriate - Fix indentation Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
load_all_cursors_from_dir and xcursor_theme_inherits already have the NULL checks we want. Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
We don't ever need to set the name multiple times for a single struct xcursor_images, so we can just set the field directly. Also replace the hand-rolled logic with strdup. Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
This avoids storing 8KiB on the stack, and removes the line length limit. Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
It's just calling xcursor_xc_file_load_images. Signed-off-by: Simon Ser <contact@emersion.fr>
-
- May 26, 2022
-
-
Simon Ser authored
Signed-off-by: Simon Ser <contact@emersion.fr>
-
- May 24, 2022
-
-
This allows projects to use Wayland as a Meson subproject and get the wayland-scanner executable when doing find_program('wayland-scanner'). Signed-off-by: Xavier Claessens <xavier.claessens@collabora.com>
-
- May 23, 2022
-
-
Simon Ser authored
Without {.xml}, Doxygen interprets the code as C. See [1] for details. [1]: https://www.doxygen.nl/manual/commands.html#cmdcode Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Just use FILE * directly instead. Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Use early returns and breaks to avoid dealing with very long indentation lines. Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Improves readability since there's no need for so many parentheses anymore, adds type safety. The compiler will inline the function automatically as necessary. Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Use tabs. Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
free(NULL) is valid and is a no-op. Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Use a single space between type and variable name. Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Use tabs for indentation, don't use tabs to align field names. Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Don't use tabs, don't align. Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
This is in line with the rest of the Wayland code style. Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
These are unused. Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Just use <stdbool.h> instead. Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Just use the types directly instead. Signed-off-by: Simon Ser <contact@emersion.fr>
-
Simon Ser authored
Add a helper to check the advertised version of a global. This can be handy when checking whether a compositor feature is supported, instead of having to store the version passed to wl_global_create separately. Signed-off-by: Simon Ser <contact@emersion.fr>
-
- May 16, 2022
-
-
Derek Foreman authored
Since server IDs are basically indistinguishable from really big client IDs at many points in the source, it's theoretically possible to overflow a map and either overflow server IDs into the client ID space, or grow client IDs into the server ID space. This would currently take a massive amount of RAM, but the definition of massive changes yearly. Prevent this by placing a ridiculous but arbitrary upper bound on the number of items we can put in a map: 0xF00000, somewhere over 15 million. This should satisfy pathological clients without restriction, but stays well clear of the 0xFF000000 transition point between server and client IDs. It will still take an improbable amount of RAM to hit this, and a client could still exhaust all RAM in this way, but our goal is to prevent overflow and undefined behaviour. Fixes #224 Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
-
- May 11, 2022
-
-
Without this, DocBook picks the output encoding and on some setups we end up with ISO-8859-1. Tested by booting a fresh Alpine VM, verifying that the generated HTML is using the incorrect charset, applying the patch, and verifying that the generated HTML is fixed. Signed-off-by: Simon Ser <contact@emersion.fr>
-
- May 10, 2022
-
-
Simon Ser authored
Fail when tests/documentation is enabled without libraries. Fail when neither scanner nor libraries is enabled, because we don't build anything in that case. Signed-off-by: Simon Ser <contact@emersion.fr>
-