aboutsummaryrefslogtreecommitdiff
path: root/backend/multi
AgeCommit message (Collapse)Author
2024-02-15Define _POSIX_C_SOURCE globallySimon Ser
Stop trying to maintain a per-file _POSIX_C_SOURCE. Instead, require POSIX.1-2008 globally. A lot of core source files depend on that already. Some care must be taken on a few select files where we need a bit more than POSIX. Some files need XSI extensions (_XOPEN_SOURCE) and some files need BSD extensions (_DEFAULT_SOURCE). In both cases, these feature test macros imply _POSIX_C_SOURCE. Make sure to not define both these macros and _POSIX_C_SOURCE explicitly to avoid POSIX requirement conflicts (e.g. _POSIX_C_SOURCE says POSIX.1-2001 but _XOPEN_SOURCE says POSIX.1-2008). Additionally, there is one special case in render/vulkan/vulkan.c. That file needs major()/minor(), and these are system-specific. On FreeBSD, _POSIX_C_SOURCE hides system-specific symbols so we need to make sure it's not defined for this file. On Linux, we can explicitly include <sys/sysmacros.h> and ensure that apart from symbols defined there the file only uses POSIX toys.
2024-01-25backend/multi: take wl_event_loop instead of wl_displaySimon Ser
2024-01-25backend/multi: emit destroy signal before destroying child backendsSimon Ser
Some users might want to destroy the multi backend when a child backend is being destroyed. However, they can't destroy the multi backend if it's already in the process of being destroyed. The destroy signal was changed to be emitted after destroying child backends in babdd6ccf757 ("backend: fix use-after-free when destroying backends"). However, this was done to accomodate for an old "output_remove" event on backends, which has long been dropped in favor of wlr_output.events.destroy. This patch follows the same principle as 5d639394f3e8 ("types/output: emit destroy event before destroying global").
2023-10-30backend: drop wlr_backend_get_presentation_clock()Simon Ser
We can just assume CLOCK_MONOTONIC everywhere. Simplifies the backend API, and fixes clock mismatches when multiple backends are used together with different clocks.
2023-10-03treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practicalAlexander Orzechowski
2023-07-11Use wl_container_of() instead of castsSimon Ser
This slightly improves type safety. The culprits were found with: git grep -E '\([a-z0-9_ ]+ \*\)\W?[a-z]'
2022-11-15backend: drop wlr_backend_get_session()Simon Ser
This no longer has purpose.
2022-08-18Use wl_signal_emit_mutableAlexander Orzechowski
2021-11-19backend/multi: add asserts in wlr_multi_backend_addSimon Zeni
2021-11-18backend/multi: remove backend_get_rendererSimon Zeni
2021-10-22backend/multi: implement get_buffer_capsSimon Zeni
2021-05-21backend: introduce wlr_backend_finishSimon Ser
This new functions cleans up the common backend state. While this currently only emits the destroy signal, this will also clean up the renderer and allocator in upcoming patches.
2021-04-12backend: move get_drm_fd to public interfaceRoman Gilg
The get_drm_fd was made available in an internal header with a53ab146f. Move it now to the public header so consumers opting in to the unstable interfaces can make use of it.
2021-02-05Make implementation function lists static constManuel Stoeckl
This requires a change to the type of `struct wlr_tablet` and `wlr_tablet_init` signature, both of which are part of the unstable API.
2021-01-16backend/multi: implement get_drm_fdSimon Ser
Just like get_renderer, iterate over all sub-backends until we find one that implements get_drm_fd.
2020-05-02backend/multi: handle backends depending on each other properlySimon Ser
wl_list_for_each_safe only allows the current list item to be removed. If a backend destroys itself when another backend is destroyed, this blows up.
2020-04-14backend/multi: add backends at end of listSimon Ser
This allows wlr_multi_for_each_backend to iterate on the backends in the order where they have been added.
2019-12-23meson: Various improvementsScott Anderson
Bumps minimum version to 0.51.0 - Remove all intermediate static libraries. They serve no purpose and are just add a bunch of boilerplate for managing dependencies and options. It's now managed as a list of files which are compiled into libwlroots directly. - Use install_subdir instead of installing headers individually. I've changed my mind since I did that. Listing them out is annoying as hell, and it's easy to forget to do it. - Add not_found_message for all of our optional dependencies that have a meson option. It gives some hints about what option to pass and what the optional dependency is for. - Move all backend subdirectories into their own meson.build. This keeps some of the backend-specific build logic (especially rdp and session) more neatly separated off. - Don't overlink example clients with code they're not using. This was done by merging the protocol dictionaries and setting some variables containing the code and client header file. Example clients now explicitly mention what extension protocols they want to link to. - Split compositor example logic from client example logic. - Minor formatting changes
2018-10-17Increase _POSIX_C_SOURCE to 200112Lsghctoma
CLOCK_MONOTONIC appeared in IEEE Std. 1003.1-200x, it was not part of POSIX.1b (the 1993 version), and FreeBSD treats it accordingly.
2018-10-04Rename get_present_clock to get_presentation clock, use itemersion
2018-09-24Rework session handlingnyorain
Sessions can now be retrieved from a backend in a more general manner. Multi-backend gets back its `session` field that contains the session if one was created, removing the interfacing from multi backend with the drm backend directly. This adds the possibility to use sessions even without the drm backend. It additionally fixes the bug that 2 session objects got created when WLR_BACKENDS were set to "libinput,drm". To allow vt switching without drm backend (and drm fd) on logind, start listening to PropertiesChanged signals from dbus and parse the session "Active" property when no master fd was created (this does not change current drm backend behaviour in any way).
2018-09-19Introduce wlr_multi_for_each_backendRyan Dwyer
2018-09-18backend/multi: add assertionsemersion
2018-08-03multi-backend: do not expose internal renderersMariusz Bialonczyk
backend_get_renderer() is now returning the renderer of the primary GPU, instead of its own renderer, since that's the thing which actually does all of the "real" rendering wlr_multi_backend_add() is now adding all subbackends (otherwise only one GPU is handled). credits: @ascent12
2018-07-09util: add wlr_ prefix to log symbolsemersion
2018-05-19backend/multi: disallow multiple renderers at the same timeemersion
2018-04-25Remove wlr_ prefix from local symbolsemersion
2018-04-08backend: remove wlr_backend_get_eglemersion
2018-02-19Revert "ELF Visibility"Drew DeVault
2018-02-19Explicitly export EFL symbolsScott Anderson
2018-02-12Reformat all #include directivesemersion
2018-02-12Make wlr_signal_emit_safe privateemersion
2018-02-12Remove wlr_backend.events.{output_remove,device_remove}emersion
2018-02-12Add wlr_signal_emit_safeemersion
2018-01-30backend: fix use-after-free when destroying backendsemersion
The backend destroy signal is emitted before the output_remove signal is. When the destroy signal is emitted listeners remove their output_remove listener, so the output_remove signal is never received and listeners have an invalid output pointer. The correct way to solve this would be to remove the output_remove signal completely and use the wlr_output.events.destroy signal instead. This isn't yet possible because wl_signal_emit is unsafe and listeners cannot be removed in listeners.
2018-01-23Backport screenshooter fixes from the renderer redesign v1emersion
This backports some changes to #319 to fix the screenshooter data format. This also adds wlr_backend_get_renderer which will be useful to support multiple renderers.
2017-12-28Remove display_destroy on multi-backend destroyTimidger
2017-12-21handle display destroyTony Crisci
2017-12-20backend add and remove eventsTony Crisci
2017-12-20rootston: handle backend creation failedTony Crisci
2017-12-19multibackend remove subbackendTony Crisci
2017-12-19subbackend state destroyTony Crisci
2017-12-19remove session from multibackendTony Crisci
2017-12-19Destroy multi backend on display destroyemersion
2017-12-08Listen to display destroy in sessionemersion
It's not the backend's responsibility to destroy the session anymore.
2017-11-01multi_backend_destroy: fix trivial use-after-freeDominique Martinet
2017-10-21Merge branch 'master' into heghe/wl_listDrew DeVault
2017-10-21Remove wl_list_init when using wl_signal_addemersion
2017-10-20Replace list_t with wl_list in wlr_multi_backendHeghedus Razvan
Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
2017-08-26Merge wlr_udev into wlr_sessionScott Anderson