aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-09-22scene: use scene_node_get_size in wlr_scene_node_atSimon Ser
This allows to unify the RECT and BUFFER code-paths. The BUFFER one will become more complicated with destination size and transforms.
2021-09-22scene: add scene_node_get_size helperSimon Ser
2021-09-22scene: add wlr_scene_buffer_set_source_boxSimon Ser
2021-09-22util/box: introduce wlr_fbox_emptySimon Ser
Same as wlr_box_empty, but for wlr_fbox.
2021-09-22scene: add wlr_scene_bufferSimon Ser
This new scene-graph node displays a wlr_buffer. Closes: https://github.com/swaywm/wlroots/issues/3161
2021-09-22scene: unify intersection logic in wlr_scene_node_atSimon Ser
Let's extract the common bits.
2021-09-22scene: drop default case in wlr_scene_node_atSimon Ser
This allows the compiler to error out if we haven't enumerated all of the cases. This is useful to avoid a missing implementation when adding a new node type.
2021-09-22Implement input_method_v2 popupsTadeo Kondrak
2021-09-22input-method-unstable-v2: Add error for surface with existing roleTadeo Kondrak
2021-09-21backend/drm: add support for panel orientationSimon Ser
Expose the panel orientation with wlr_drm_connector_get_panel_orientation. Leave it to the compositor to consume this information and configure the output accordingly. Closes: https://github.com/swaywm/wlroots/issues/1581
2021-09-21build: simplify get_variable callsSimon Ser
With recent-ish Meson we can stop repeating the variable name for each provider.
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.