aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-09-21scene: add wlr_scene_subsurface_tree_createSimon Ser
2021-09-21surface: add addon setSimon Ser
2021-09-21scene: add wlr_scene_treeSimon Ser
2021-09-21xdg surface: check adding configure_idle for NULLKirill Primak
2021-09-21xdg-surface: simplify configure mechanismKirill Primak
This commit removes any checks whether a configure will change anything and makes configures be sent unconditionally. Additionally, configures are scheduled on xdg_toplevel.{un,}set_{maximized,fullscreen} events.
2021-09-21xdg-toplevel: refactor configure/state flowKirill Primak
Previously, `wlr_xdg_toplevel` didn't follow the usual "current state + pending state" pattern and instead had confusingly named `client_pending` and `server_pending`. This commit removes them, and instead introduces `wlr_xdg_toplevel.scheduled` to store the properties that are yet to be sent to a client, and `wlr_xdg_toplevel.requested` to store the properties that a client has requested. They have different types to emphasize that they aren't actual states.
2021-09-15types/buffer: make {begin,end}_data_ptr_access part of the public APISimon Zeni
2021-09-14ci: switch to seatd-launchSimon Ser
This removes the need for the ad-hoc loop. Because udev creates the symlinks in /dev/dri/by-path/, we need to wait for it to consume all pending events before the chmod call. Previously the delay needed for seatd to come up was enough to let udev create the symlinks in time (by chance).
2021-09-11xdg popup: move function to a file it belongs toKirill Primak
2021-09-11xwayland: Allow to retrieve startup-id via _NET_STARTUP_INFOGuido Günther
A launchee notifies with a "remove"¹ message when done starting up. Catch these and forward to the compositor. This allows the compositor to end the startup sequence that might have been started by another protocol like xdg-activation. We don't handle other messages since we expect the launcher to use a wayland protocol like xdg-activation. While `_NET_STARTUP_ID` helps to associate toplevels with startup-ids this signals the end of the startup sequence. 1) https://specifications.freedesktop.org/startup-notification-spec/startup-notification-latest.txt
2021-09-10buffer: add data_ptr access flagsSimon Ser
This allows callers to specify the operations they'll perform on the returned data pointer. The motivations for this are: - The upcoming Linux MAP_NOSIGBUS flag may only be usable on read-only mappings. - gbm_bo_map with GBM_BO_TRANSFER_READ hurts performance.
2021-09-10screencopy: Handle shm copy in commit event handlerAndri Yngvason
This simplifies the implementation considerably.
2021-09-10screencopy: Use output->front_buffer instead of wlr_output_export_dmabufAndri Yngvason
2021-09-09scene: add wlr_scene_attach_output_layoutSimon Ser
This is a helper to integrate wlr_scene with wlr_output_layout.
2021-09-09scene: move source to subdirSimon Ser
This will allow more scene-graph extensions to be added without cluttering wlr_scene.c, for instance for sub-surface handling and wlr_output_layout integration.
2021-09-09scene: fix compile error in release buildsQuantum
On release builds, gcc detects a variable uninitialized error, and generates a warning, which gets converted to an error due to -Werror.
2021-09-08examples/scene-graph: use wlr_scene_outputSimon Ser
This allows us to get damage tracking for free™.
2021-09-08scene: add damage tracking supportSimon Ser
2021-09-08scene: add wlr_scene_node_coordsSimon Ser
2021-09-08scene: add wlr_scene_output_commitSimon Ser
2021-09-08scene: add scene outputsSimon Ser
These allow describing an output's viewport inside the scene-graph.
2021-09-08scene: fix wlr_scene_render_output offsetSimon Ser
When providing non-zero layout-local coordinates to wlr_scene_render_output, the viewport should be translated by the given values. However the viewport was translated by the opposite values: when giving 42,42 the viewport's position would be set to -42,-42.
2021-09-08types: introduce wlr_drm_lease_v1Simon Zeni
2021-09-08protocol/meson: bump wayland-protocols requirement to 1.22Simon Zeni
2021-09-08backend/drm: introduce wlr_drm_backend_get_non_master_fdSimon Zeni
2021-09-08backend/drm: implement drm lease functionSimon Zeni
2021-09-07backend/drm: drop wlr_drm_connector.desired_modeSimon Ser
Previously used by attempt_enable_needs_modeset, but this has been dropped in the previous commit.
2021-09-07backend/drm: drop attempt_enable_needs_modesetSimon Ser
Modesets require a buffer. The DRM backend tried to auto-enable outputs when a CRTC becomes available in the past, but now that fails because no buffer is available. Instead of having this magic inside the DRM backend, a better approach is to do it in the compositor or in an optional helper.
2021-09-07output-damage: fix damage on modesetSimon Ser
On modeset wlr_output will internally allocate a buffer. The backend will emit a "mode" output event, then wlr_output will emit a "commit" event. wlr_output_damage handles the "mode" event by damaging the whole output, and then handles the "commit" event. However the commit event has a buffer, so wlr_output_damage rotates the damage in its ring buffer, thinking the compositor has rendered a frame. The compositor hasn't rendered a frame, what wlr_output_damage sees is the internal wlr_output black buffer used for the modeset. Let's fix this by damaging the whole output in the "commit" event handler if the mode has changed. Additionally, damage the whole output after rotating the damage ring buffer.
2021-09-07backend: wait for session to become activemuradm
2021-09-07backend/drm: drop drm_connector_init_rendererSimon Ser
drm_connector_set_pending_fb already takes care of this.
2021-09-07backend/drm: drop unused arg from get_possible_crtcsSimon Ser
Constify drmModeConnector while at it.
2021-09-07backend/drm: fix crash on VT switchSimon Ser
Don't set the MODE flag when disabling a CRTC. This fixes a NULL pointer dereference in drm_connector_state_init.
2021-09-07backend/drm: introduce wlr_drm_connector_stateSimon Ser
Previously, we were copying wlr_output_state on the stack and patching it up to be guaranteed to have a proper drmModeModeInfo stored in it (and not a custom mode). Also, we had a bunch of helpers deriving DRM-specific information from the generic wlr_output_state. Copying the wlr_output_state worked fine so far, but with output layers we'll be getting a wl_list in there. An empty wl_list stores two pointers to itself, copying it on the stack blindly results in infinite loops in wl_list_for_each. To fix this, rework our DRM backend to stop copying wlr_output_state, instead add a new struct wlr_drm_connector_state which holds both the wlr_output_state and additional DRM-specific information.
2021-09-07backend/drm: rename enum wlr_drm_connector_state to statusSimon Ser
"state" is easily confused with wlr_output_state.
2021-09-07surface: fix abort on NULL buffer attachSimon Ser
Fixes: ba0525c5c08b ("surface: drop wlr_surface_state.buffer_resource") Closes: https://github.com/swaywm/wlroots/issues/3173
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.