aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-13surface: improve role precommit hookKirill Primak
Now the role precommit hook is called before the commit, not on wl_surface.commit request, and takes a state which is to be applied.
2022-01-13surface: deprecate wlr_surface.hKirill Primak
2022-01-13surface: move decl to wlr_{sub,}compositor.hKirill Primak
2022-01-13surface: move impl to types/wlr_{sub,}compositor.cKirill Primak
2022-01-13surface: introduce events.client_commitKirill Primak
wlr_surface.events.client_commit is fired when wl_surface.commit request is received.
2022-01-13subcompositor: split out from compositorKirill Primak
2022-01-09readme: drop mention of the Sway projectSimon Ser
wlroots has historically been started as a Sway project, but these days many wlroots contributors are working on other compositors. wlroots now also has its own namespace on gitlab.freedesktop.org. Let's remove the mention about Sway in the README, to make it clearer that Sway isn't treated in a special manner when it comes to wlroots development.
2022-01-08scene/subsurface_tree: fix handling subsurface destructionKirill Primak
This commit renames map/unmap listeners to clarify that they handle subsurface events, and ensures the node is always destroyed before the subsurface. Without this patch, wl_list_remove() would operate on listener links in already freed memory. glibc is usually lenient to bugs like this, but musl isn't.
2022-01-05render/gles2: don't constrain shm formats to ones that support readingThomas Hebb
commit 44e8451cd93e ("render/gles2: hide shm formats without GL support") added the is_gles2_pixel_format_supported() function to render/gles2/pixel_format.c, whose stated purpose is to "check whether the renderer has the needed GL extensions to read a given pixel format." It then used that function to filter the pixel formats returned by get_gles2_shm_formats(). The result of this change is that RGB formats are no longer reported for GL drivers that don't implement EXT_read_format_bgra, even when those formats are supported for rendering (which they have to be for wlr_gles2_renderer_create() to succeed). This is a pretty clear regression, since wlr_renderer_init_wl_shm() fails when either of WL_SHM_FORMAT_ARGB8888 or WL_SHM_FORMAT_XRGB8888 are missing. To fix the regression, change is_gles2_pixel_format_supported() to accept all pixel formats that support rendering, regardless of whether we can read them or not, and move the check for EXT_read_format_bgra back into gles2_read_pixels(). (There's already a check for this extension in gles2_preferred_read_format(), so we're not breaking any abstraction that wasn't already broken.) Tested on the NVIDIA 495.46 proprietary driver, which doesn't support EXT_read_format_bgra. Fixes: 44e8451cd93e ("render/gles2: hide shm formats without GL support")
2021-12-26vulkan: Fix imported image layoutnyorain
2021-12-23scene: schedule an output frame on wl_surface.frameSimon Ser
Some clients (e.g. mpv, Firefox) request a new wl_surface.frame callback without damaging their surface. When this happens, schedule a new output frame. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3350
2021-12-20wlr_texture: remove wlr_texture_from_wl_drm() from headerIsaac Freund
This function was already removed in e5b5592a but it was forgotten to remove it from the header.
2021-12-20backend: error out in autocreate without libinput supportSimon Ser
The libinput backend is now optional. However, this means that a user building wlroots without the correct libinput dependencies will end up with a compositor which doesn't respond to input events. wlr_backend_autocreate is supposed to return a sensible setup, so in this case let's just error out and explain what happened. Users can suppress the check by setting WLR_LIBINPUT_NO_DEVICES=1 (already used to suppress the zero input device case inside the libinput backend). Compositors which really want to create a bare DRM backend can easily create it manually instead of using wlr_backend_autocreate.
2021-12-19build: simplify Meson subproject fallbacksSimon Ser
All of these projects use meson.override_dependency() so we can stop referencing their internal variable name to grab the depndencies we need.
2021-12-17Remove wlr_box.h redirectionSimon Ser
Compositors should've all been updated to use the new header by now.
2021-12-17build: bump soversionSimon Ser
According to [1] this should be done at each release with breaking ABI changes. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/wikis/Core-contributor-guide#releasing-a-new-version Fixes: 7360810f2e5c ("build: bump to version 0.16.0")
2021-12-17layer-shell: fix type of marginsIsaac Freund
These currently use uint32_t while they are an int32_t in the protocol.
2021-12-17build: bump to version 0.16.0Simon Ser
2021-12-15backend/wayland: add basic linux-dmabuf feedback supportSimon Ser
This patch makes it so we bind to zwp_linux_dmabuf_v1 version 4 and we use it to grab the main device. v4 sends supported formats via a table so we need to handle this as well. v4 allows wlroots to remove the requirement for Mesa's internal wl_drm interface.
2021-12-15layer-shell: don't set committed flag if the property didn't changeStacy Harper
This fixes configure loop in Sway when clients re-send same properties on every configure event. Original issue: https://todo.sr.ht/~mil/sxmo-tickets/413
2021-12-14scene: add wlr_scene_set_presentation()Isaac Freund
This helper automates sending presentation feedback to clients based on the primary output of scene surfaces.
2021-12-14build: add subproject fallback for libdrmSimon Ser
2021-12-14backend/drm: use drmCloseBufferHandleSimon Ser
This has been added in [1] and allows us to close buffer handles without manually calling drmIoctl. [1]: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/192
2021-12-14backend/drm: use drmModeFormatModifierBlobIterNextSimon Ser
This avoids open-coding our own logic. The resulting code is more readable. References: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/146
2021-12-14util/global: remove wl_display arg from wlr_global_destroy_safeSimon Ser
Since [1], we can get the wl_display directly from the wl_global. [1]: https://gitlab.freedesktop.org/wayland/wayland/-/commit/2b22160fb690a76247aa9bd0be3069ff43e8239f
2021-12-14xdg-activation: Allow to submit tokensGuido Günther
Allows the compositor to submit tokens to the pool of currently active tokens. This can be useful when the launcher doesn't use or support xdg-activation-v1 by itself - e.g. when it is X11 based or use gtk_shell1.
2021-12-14seat: Only resend keyboard/pointer enter to focused clientsDavid Rosca
Otherwise it will send enter events to clients that already have keyboard/pointer focus. Notably Qt applications warns about this.
2021-12-13scene: fix wlr_scene_send_frame_done() APIIsaac Freund
This doesn't work if scene outputs are not used as the primary output of scene surfaces will always be NULL. Therefore, take a wlr_scene_output instead of separate wlr_scene and wlr_output arguments and rename the function to wlr_scene_output_send_frame_done(). The actual behavior of the function is unchanged.
2021-12-13tinywl: use wlr_scene_send_frame_done()Isaac Freund
2021-12-13scene: add wlr_scene_send_frame_done()Isaac Freund
2021-12-13scene: add primary output to wlr_scene_surfaceIsaac Freund
This allows compositors to avoid sending multiple frame done events to a surface that is rendered on multiple outputs at once. This may also be used in the same way for presentation feedback.
2021-12-13scene: send surface enter/leave output eventsIsaac Freund
Co-authored-by: Simon Ser <contact@emersion.fr>
2021-12-13backend/drm: add wlr_drm_backend_monitorChris Chamberlain
This helper is responsible for listening for new DRM devices and create new child DRM backends as necessary.
2021-12-13backend: fix return value of attempt_drm_backendChris Chamberlain
The multi backend was returned instead of the primary DRM backend.
2021-12-13output: add support for protocol interface version 4Simon Ser
Two new events are added: name and description. The name is immutable. The description can be updated on-the-fly.
2021-12-09subsurface: don't add to parent list immediatelyKirill Primak
2021-12-09surface: fix non-buffer damage handlingKirill Primak
This commit fixes the way the damage that doesn't come directly from the client is handled.
2021-12-09subsurface: apply position change at the right momentKirill Primak
Subsurface position is considered to be a part of the parent surface's state, therefore it should be modified when the parent is committed.
2021-12-09subsurface: simplify and fix parent commit handlingKirill Primak
2021-12-09Fix incorrect %zd formatting directivesSimon Ser
%zd is for ssize_t. For size_t we should use %zu.
2021-12-09output: introduce wlr_output_set_nameSimon Ser
wlroots picks names for all outputs, but it might be desirable for compositor to override it. For instance, Sway will use a headless output as a fallback in case no outputs are connected. Sway wants to clearly label the fallback output as such and label "real" headless outputs starting from HEADLESS-1.
2021-12-07examples: remove unnecessary partial_dependency() callSimon Ser
The definition of the "drm" dep already calls it.
2021-12-07examples: remove unnecessary wlroots deps for clientsSimon Ser
These clients don't need wlroots.
2021-12-07examples/layer-shell: remove wlroots dependencySimon Ser
This is a client example, it shouldn't use a compositor library like wlroots.
2021-12-07build: move wayland-client dep to backend/wayland/Simon Ser
wayland-client isn't really used by wlroots core, so let's move the dep to where it's needed in the Wayland backend.
2021-12-07linux-dmabuf-v1: add per-surface feedbackSimon Ser
2021-12-07linux-dmabuf-v1: implement v4Simon Ser
Implement a basic version of linux-dmabuf-unstable-v1 version 4. Only default hints are implemented. The new wlr_linux_dmabuf_feedback_v1 data structure will allow compositors to define their own custom hints in the future. This data structure makes it easy to describe feedback metadata. It's converted to a "compiled" form suitable for marshalling over the Wayland socket via feedback_compile.
2021-12-07render: add wlr_renderer_init_wl_shmSimon Ser
This allows compositors to initialize wl_shm without initializing other globals like linux-dmabuf.
2021-12-06surface: fix damage transformationKirill Primak
2021-12-04Fix wlr_scene_node_lower_to_bottomtiosgz
Before this commit, it would keep the node at the top or make it second- topmost.