aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-09-06surface: drop wlr_surface_state.buffer_resourceSimon Ser
Instead, use wlr_surface_state.buffer only.
2021-09-06surface: ensure buffer is reset to NULL in surface_state_moveSimon Ser
When surface_state_move processes a NULL commit, make sure to reset state->buffer to NULL instead of leaving behind an old wlr_buffer.
2021-09-06viewporter: hide wlr_viewportSimon Ser
This is an internal struct.
2021-09-06viewporter: add doc comment explaining compositor requirementsSimon Ser
2021-09-06buffer: make wlr_client_buffer_apply_damage return a boolSimon Ser
We always return the same wlr_client_buffer as the one passed in, so no need to return anything.
2021-09-06buffer: take a wlr_buffer in wlr_client_buffer_apply_damageSimon Ser
Instead of taking a wl_resource as argument, take a wlr_buffer.
2021-09-06surface: inline surface_commit_pending()Kirill Primak
2021-09-06surface: change surface_finalize_state() to surface_finalize_pending()Kirill Primak
2021-09-06surface: rename impl and its functionsKirill Primak
This makes the naming consistent with other resource implementations.
2021-09-06surface: move subsurface lists to stateKirill Primak
2021-09-06subsurface: move parent link to stateSimon Ser
Move the wlr_subsurface parent link to the subsurface state. This is a dumb find/replace operation. This shouldn't result in any behavior change.
2021-09-06subsurface: rename wlr_subsurface_state to wlr_subsurface_parent_stateSimon Ser
Add a comment to explain the difference.
2021-09-06surface: cache frame callback lists againKirill Primak
Caching frame callback lists is actually the correct behavior, because if a surface is locked because of e.g. subsurface synchronization, clients would expect to receive frame done events only after the pending state is actually committed.
2021-09-05seat: avoid copying the keymap for each clientSimon Ser
We can just send a read-only file descriptor instead.
2021-09-05keyboard: add wlr_keyboard.keymap_fdSimon Ser
This exposes a read-only FD with the keymap.
2021-09-05util/shm: add allocate_shm_file_pairSimon Ser
This function behaves like allocate_shm_file, except it also returns a read-only FD. This is useful to share the same segment of memory with many Wayland clients.
2021-09-03render/allocator/gbm: add log message for gbm_bo_get_fd_for_planeSimon Ser
Makes it easier to find out which branch is taken when debugging issues like [1]. [1]: https://github.com/swaywm/wlroots/issues/3156
2021-09-03backend/drm: handle drm_surface_blit errorsSimon Ser
drm_surface_blit returns NULL on error. This can happen e.g. when the source buffer cannot be imported into EGL. Closes: https://github.com/swaywm/wlroots/issues/3154
2021-09-03render/allocator: use legacy authentication for primary nodesSimon Ser
Closes: https://github.com/swaywm/wlroots/issues/3156
2021-09-02scene: remove redundant empty-region check in render_texture()Devin J. Pohly
2021-09-02examples/scene-graph: demonstrate scene_rect node typeDevin J. Pohly
Add RECT nodes to the scene-graph demo to illustrate how they are used. Here, we add a solid rectangle behind each surface as a quick-and-dirty border, handling surface.commit in order to size it appropriately.
2021-09-02scene: replace surface_at() with node_at()Devin J. Pohly
With the addition of a non-surface node type, it was unclear how such nodes should interact with scene_node_surface_at(). For example, if the topmost node at the given point is a RECT, should the function treat that node as transparent and continue searching, or as opaque and return (probably) NULL? Instead, replace the function with one returning a scene_node, which will allow for more consistent behavior across different node types. Compositors can downcast scene_surface nodes via the now-public wlr_scene_surface_from_node() if they need access to the surface itself.
2021-09-02scene: add RECT node typeDevin J. Pohly
RECT is a solid-colored rectangle, useful for simple borders or other decoration. This can be rendered directly using the wlr_renderer, without needing to create a surface.
2021-09-02scene: iterate nodes instead of surfaces when renderingDevin J. Pohly
This will allow us to create node types which are rendered but not surface-based, such as a solid color or image.
2021-09-02contributing: don't reference issues in commit first lineSimon Ser
Commits named "Fix #XXX" make it pretty complicated to figure out exactly what the commit is doing from the shortlog. A better place for issue references is in the extended commit message.
2021-09-01build: add subproject fallback for wayland-protocolsSimon Ser
Depends on [1]. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/84
2021-09-01build: add subproject fallback for waylandSimon Ser
2021-09-01render/allocator/gbm: fix create() docs for FD ownershipSimon Ser
Fixes: d9d8fc1ab9b7 ("render/allocator: re-open GBM FD")
2021-09-01render/allocator: re-open GBM FDSimon Ser
Using the same DRM file description for the DRM backend and for the GBM allocator will result in GEM handle ref'counting issues [1]. Re-open the DRM FD to fix these issues. [1]: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/110
2021-08-30Link to gamja for web chatSimon Ser
gamja offers a better experience than Kiwi.
2021-08-30scene: stricter assertions on reparentDevin J. Pohly
For consistency with the rest of the scene-graph API, prevent detaching a subtree by giving NULL for the new parent, and don't allow ROOT nodes to be grafted into another tree.
2021-08-30scene: make graph loops fatal when debuggingDevin J. Pohly
2021-08-30scene: ensure node cannot be reparented below itselfDevin J. Pohly
2021-08-30scene: add node reparent functionDevin J. Pohly
If nodes are arranged in a tree rather than at a single level, then it makes sense that there should be a way to move them to a completely different parent in addition to moving up or down among siblings.
2021-08-30contributing: turn remaining links into refsSimon Ser
2021-08-30contributing: clone wlroots fork with SSHSimon Ser
HTTPS URLs aren't writable.
2021-08-30contributing: use references for linksSimon Ser
This avoids cluttering the prose with URLs.
2021-08-30contributing: add new section about commit logSimon Ser
This is shamelessly stolen from Weston [1]. It's been a while we've transitioned away from merge commits and work-style commit history, so it'd be nice to mention this in the docs. [1]: https://gitlab.freedesktop.org/wayland/weston/-/blob/main/CONTRIBUTING.md#formatting-and-separating-commits
2021-08-28xwm: do not restack surfaces on activationTudor Brindus
Currently, upon activating a surface, wlroots restacks it on top of all others. This may not necessarily be correct from the calling compositor's point of view, where having focus may not imply being top-of-stack (e.g., focusing a window under an always-on-top window). In Sway's case, this means that focused tiling windows will always be on top of floating windows, at least in the order communicated to X11 apps. This breaks drag-and-drop from a focused tiling X11 window to a floating X11 window which partially obscures the former. This is a breaking change; to retain the previous behavior, users that were calling wlr_xwayland_surface_activate(xsurface, true); should now be calling wlr_xwayland_surface_activate(xsurface, true); wlr_xwayland_surface_restack(xsurface, NULL, XCB_STACK_MODE_ABOVE);
2021-08-26scene: add wlr_scene_node_surface_atSimon Ser
2021-08-26scene: add user data pointer to wlr_scene_nodeSimon Ser
This allows compositors to attach arbitrary data to the scene-graph nodes.
2021-08-26scene: allow nodes to have arbitrary parentsSimon Ser
For instance, allow a surface node to be a child of another surface node. This allows easier xdg-popup handling in compositors.
2021-08-26scene: add wlr_scene_node_toggleSimon Ser
This allows compositors to easily enable or disable a scene-graph node. This can be used to show/hide a surface when the xdg_surface is mapped/unmapped.
2021-08-26examples/scene-graph: new exampleSimon Ser
2021-08-26Introduce new scene-graph APISimon Ser
A new wlr_scene API has been added, following the design ideas from [1]. The new API contains the minimal set of features required to make the API useful. The goal is to design a solid fundation and add more features in the future. [1]: https://github.com/swaywm/wlroots/issues/1826#issuecomment-564601757
2021-08-25subsurface: unlock surface on destroyKirill Primak
2021-08-25backend/drm: introduce wlr_drm_bo_handle_tableSimon Ser
Using GBM to import DRM dumb buffers tends to not work well. By using GBM we're calling some driver-specific functions in Mesa. These functions check whether Mesa can work with the buffer. Sometimes Mesa has requirements which differ from DRM dumb buffers and the GBM import will fail (e.g. on amdgpu). Instead, drop GBM and use drmPrimeFDToHandle directly. But there's a twist: BO handles are not ref'counted by the kernel and need to be ref'counted in user-space [1]. libdrm usually performs this bookkeeping and is used under-the-hood by Mesa. We can't re-use libdrm for this task without using driver-specific APIs. So let's just re-implement the ref'counting logic in wlroots. The wlroots implementation is inspired from amdgpu's in libdrm [2]. Closes: https://github.com/swaywm/wlroots/issues/2916 [1]: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/110 [2]: https://gitlab.freedesktop.org/mesa/drm/-/blob/1a4c0ec9aea13211997f982715fe5ffcf19dd067/amdgpu/handle_table.c
2021-08-25render/egl: reopen DRM node for GBMSimon Ser
This will be necessary for the next patch, to avoid messing up BO handles shared between the GL implementation and the DRM backend.
2021-08-25Move allocator stuff into new directorySimon Ser
Add render/allocator/ and include/render/allocator/ to hold everything allocator-related.
2021-08-25backend/{drm,libinput}: exclude headers when disabledSimon Ser