aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorLines
2024-05-18build: drop xwayland optionFurkan Sahin-12/+13
Instead of having a build-time option to enable/disable xwayland support, just use the wlroots build config: enable xwayland in Sway if it was enabled when building wlroots. I don't see any use-case for disabling xwayland in Sway when enabled in wlroots: Sway doesn't pull in any additional dependency (just pulls in dependencies that wlroots already needs). We have a config command to disable xwayland at runtime anyways. This makes it so xwayland behaves the same way as other features such as libinput backend and session support. This also reduces the build matrix (less combinations of build options). I think we originally introduced the xwayland option when we didn't have a good way to figure out the wlroots build config from the Sway build system.
2024-03-28config/output: Search for output config fallbacksFurkan Sahin-1/+4
The original sway output config implementation enabled one output at a time, testing modes, render formats and VRR support as it went along. While this sort of fallback is easy to do, it has the downside of not considering the effect of neighbor outputs on the configuration viability. With backend-wide commits, we can now better consider the effect of neighbor outputs, but to handle the fact that we commit all outputs at once we need to perform a more elaborate search of viable configurations. Implement a recursive configuration search for when the primary configuration failed to apply.
2024-03-16config/output: Refactor handling of tiered configsFurkan Sahin-1/+8
Output configuration can be applied to a particular output in three ways: As a wildcard, by connector name and by identifier. This in turn means that three different configurations must be handled at any given time. In the current model, this is managed by merging new configuration into every other matching configuration. At the same time, an additional synthetic configuration is made which matchehes both identifier and name at the same time, further complicating logic. Instead, manage and store each configuration independently and merge them in order when retrieving configuration for an output. When changes are made to a less specific configuration, clear these fields from more specific configurations to allow the change to take effect regardless of precedence. Fixes: https://github.com/swaywm/sway/issues/8048
2024-03-16output/config: Remove unused test_output_configFurkan Sahin-2/+0
2024-03-16config/output: Make merge_output_config staticFurkan Sahin-2/+0
2024-03-16output/config: Remove reset_outputs and co.Furkan Sahin-4/+0
apply_output_config_to_outputs uses the specified output config to check which outputs to apply to, and to use as backup when no config is found. If any config matches the output, the specified config will be disregarded. The only remaining user of apply_output_config_to_outputs is reset_outputs, which called apply_output_config_to_outputs with either the first stored wildcard config, or a new empty wildcard config. Providing a stored or empty wildcard config is practically the same as calling `apply_all_output_configs`. Replace uses of `reset_outputs` with `apply_all_output_configs` and remove the now unused functions.
2024-03-16config/output: Remove apply_output_configFurkan Sahin-2/+0
2024-03-16output/config: Add apply_all_output_configsFurkan Sahin-0/+2
Apply all output configs as they are. This differs from apply_output_config_to_outputs, which tries to apply a specific output config.
2024-03-16config/output: Introduce apply_output_configsFurkan Sahin-0/+11
Introduce apply_output_configs, which applies the specified matched output configs as a single backend commit. Reimplement apply_output_config_to_outputs using apply_output_configs.
2020-02-08Implement transient seat managementFurkan Sahin-0/+4
2024-03-14Re-create renderer when lostFurkan Sahin-0/+1
2024-03-08config/output: drop enabling flagFurkan Sahin-1/+1
This was useful when wlroots backends were updating the current mode on their own. This is no longer the case.
2024-02-27xdg-shell: implement popup repositioningFurkan Sahin-0/+1
2024-02-28Convert to new pointer enumsFurkan Sahin-4/+4
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4575
2024-02-20text_input: Implement input-method popupsFurkan Sahin-0/+23
Co-authored-by: tadeokondrak <me@tadeo.ca>
2023-12-26xdg-activation: distinguish activation and urgency requestsFurkan Sahin-0/+6
Check if the app that requested a token has provided a valid input serial and a focused surface. Downgrade activation request to urgency otherwise. This is mostly in line with what other Wayland compositors decided to do, and offers a better security than the original logic.
2024-02-07launcher: track the seat in the launcher ctxFurkan Sahin-0/+3
This is a more suitable place to track the requesting seat, since we are able to respond appropriately to destroy notifications.
2024-02-15Drop unnecessary includes from sway/server.hFurkan Sahin-17/+0
2024-02-15Fix build with wlroots DRM backend disabledFurkan Sahin-1/+0
The header is not installed by wlroots when the DRM backend is disabled. We don't need it here, so don't include it. Closes: https://github.com/swaywm/sway/issues/7943
2024-02-12view: drop ext_foreign_destroyFurkan Sahin-1/+0
It's not used and causes a crash when a view is destroyed.
2024-01-23layer_shell: Handle popups through popup descriptorFurkan Sahin-1/+4
We tried to synchronize layer shell popups with the parent layer shell on commits, but this is subtly wrong because we would only update the position for one layer shell that was committed, but not any other layer that might be affected. By moving handling to the scene descriptor we can iterate all popups and ensure they are synchronized.
2024-01-23xdg_shell: Extract struct for popup descriptorFurkan Sahin-0/+7
2024-01-23layer_shell: Arrange popups even if exclusive zone doesn't changeFurkan Sahin-0/+3
2024-02-11ext-foreign-toplevel-list: Implement protocolFurkan Sahin-0/+7
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4543
2024-01-20Add debug flag to re-enable wl_drmFurkan Sahin-0/+1
670eab852f3f ("Drop wl_drm") has dropped wl_drm, however a lot of software wasn't quite ready for this (Xwayland, libva, amdvlk). Keep wl_drm disabled by default to pressure the wl_drm phase-out, but add a -Dlegacy-wl-drm flag for users to restore the previous behavior in the meantime. References: https://github.com/swaywm/sway/issues/7897
2023-11-14scene_graph: port wlr_forgein_toplevel_management output enter/leave eventsFurkan Sahin-0/+4
2022-04-30remove damage debug optionsFurkan Sahin-7/+0
Now that we use wlr_scene, wlroots handles these. If available use the wlroots debug options instead.
2023-11-22scene_graph: Implement toplevel clippingFurkan Sahin-1/+1
2023-02-21container: Don't track outputsFurkan Sahin-22/+0
The scene graph abstraction does this for us
2023-04-06Delete old damage tracking codeFurkan Sahin-67/+0
The new scene graph abstraction handles this for us.
2023-04-27scene_graph: Port view saved buffersFurkan Sahin-15/+3
2024-01-18scene_graph: Port xwaylandFurkan Sahin-13/+9
2023-12-06scene_graph: Port xdg_shellFurkan Sahin-43/+4
2022-03-04transaction: ready signals will return success boolsFurkan Sahin-2/+9
2023-11-21scene_graph: Port container server side decorationsFurkan Sahin-24/+13
2024-01-18scene_graph: Port layer_shellFurkan Sahin-50/+19
2023-11-23input: Query scene graph for relevant surface/node intersectionsFurkan Sahin-13/+7
2023-11-23Introduce sway_text_nodeFurkan Sahin-0/+28
This is a helper on top of a wlr_scene_buffer that will handle text rendering for us.
2023-03-03renderer: Remove in favor of scene_graphFurkan Sahin-15/+0
2022-02-21seat: Remove dead seatop_render functionFurkan Sahin-8/+0
2024-01-18scene_graph: Port ext_session_v1Furkan Sahin-7/+20
2023-11-21scene_graph: Port seat drag iconsFurkan Sahin-20/+13
2023-12-04renderer: Render scene_graphFurkan Sahin-19/+1
2023-11-21scene_graph: Introduce sway_scene_descriptorFurkan Sahin-0/+25
Across a wayland compositor, there are multiple shells: It can be a toplevel, or a layer_shell, or even something more meta like a drag icon or highlight indicators when dragging windows around. This object lets us store values that represent these modes of operation and keep track of what object is being represented.
2024-01-18scene_graph: Maintain `wlr_scene_node`s for the sway tree.Furkan Sahin-0/+85
2022-03-04view: init function should return a success boolFurkan Sahin-1/+1
2022-03-01desktop: Rename layers to shell_layersFurkan Sahin-1/+1
This code will be deleted later, but for the time being rename it so it doesn't conflict with future properties.
2023-12-30input: reconfigure send_events on output hotplugFurkan Sahin-0/+3
Closes: https://github.com/swaywm/sway/issues/7890
2023-12-28Remove wlr_presentation in sway_server structFurkan Sahin-2/+0
It is no longer in use.
2023-12-06output: Destroy when output layout is destroyedFurkan Sahin-0/+1
Since output layout is destroyed when the wayland display is destroyed we run into a destroy listener order problem: Either the display starts destroying the outputs first, in which case we're good: The existing handling will clean up. However, things go wrong if the display decides to destroy the output layout first. In this case, sway will hold invalid references to the output layout as part of each output so that when it finally goes to destroy them, sway will dereference destroyed output layout bits. Ref: https://github.com/swaywm/sway/pull/6844#issuecomment-1843599513