aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorLines
2024-09-08sway/input/keyboard: always set active keyboard if there is nonellyyr-7/+7
Previously, we incorrectly only set active keyboard for non-virtual devices. 4c3c0602116c12c2821e1e505e7248b3c642b4ca incorrectly put unrelated code in `sway_keyboard_set_layout`. Fixes: 4c3c0602116c12c2821e1e505e7248b3c642b4ca
2024-09-07tree/arrange; Skip arranging disabled outputsKenny Levinsen-0/+3
Disabled outputs might not have a geometry to arrange for, so skip the arrange to avoid messing up the workspace geometry.
2024-09-07desktop/transaction: Deactivate workspace on inactive outputsKenny Levinsen-1/+1
If the output is not active, it might not have a valid geometry to arrange for. Outputs do not gain a geometry until modeset, so if an output is connected with a configuration present to disable it, it will not have a geometry. If the output has a past workspace restored, this will be attemtped arranged to fit a 0x0 rectangle, which asserts when trying to sort out borders. Consider the workspace activated only if the output itself is active to get the scene nodes disabled.
2024-09-07tree/arrange: Remove redundant output geometry updateKenny Levinsen-8/+0
This is handled by apply_output_configs.
2024-09-07container: Skip % char if it doesn't match a view propertyAlexander Orzechowski-0/+4
The else condition was missed here and we would never skip the % char if it didn't end up matching with any property. Since we fail to skip we would re-evaluate the % in an infinite loop never achieving any forward-progress. Fixes: https://github.com/swaywm/sway/issues/8333
2024-09-05tree/output: Avoid duplicate input mapping configureKenny Levinsen-2/+0
2024-09-05desktop/output: Avoid duplicate output manager updateKenny Levinsen-4/+0
2024-09-04(desktop|tree)/output: Do not use layout listener to arrangeKenny Levinsen-25/+0
Output layout changes originate from the centralized modeset infrastructure and request_state which already takes care of arranging and updating outputs as needed.
2024-09-04tree/output: Rely on modeset arranging rootKenny Levinsen-10/+0
output_enable/output_disable are only called from modeset, and from output destroy which requests modeset. As such, they can rely on the modeset handling arrange.
2024-09-04desktop/output: Do not use commit listener to arrangeKenny Levinsen-28/+24
The reasoning for using a commit handler is to ensure that all paths for output changes are correctly handled. With the centralized modeset infrastructure in place, we can move the logic there. This allows us to be smarter and avoid extraneous arranges, output manager updates and transaction commits. The side-effect is a minor duplication for the special-case request_state, but the shared path will be relied upon further in future commits to justify this duplication.
2024-09-02move title_format to containerNorbert Bolanowski-89/+102
2024-08-28use subheadings insteadJon Wallace-5/+4
2024-08-28Use heading markdown to demarcate sections of commandsJon Wallace-1/+5
Its a little tought to notice that the COMMANDS section is actually 3 sections. Use markdown to make this easier to see for the user.
2024-08-22sway/tree/container: don't trunc coords in `floating_fix_coordinates`llyyr-4/+4
This can cause issues such as the window not being shown at the exact same coordinates when the old and new wlr_box aren't the same dimensions and the container is being moved back-and-forth between them. For example, in the case where a floating window gets moved from one output to another but the outputs aren't the same resolution. For e.g. have two displays that aren't the same resolution then: 1. Open a floating window and set it to pos 0,0 on output 2 2. Send it to scratchpad then `scratchpad show` on output 1 3. `scratchpad show` on output 2 again Observe that the window isn't at 0,0 on output 2 anymore.
2024-08-22sway/commands/move.c: arrange new workspaceAnna (navi) Figueiredo Gomes-0/+1
When moving a container to a new workspace, the workspace's dimension are left unset. Usually this doesn't matter, but when moving a floating container to a new workspace on a different output, this leads to the position of the container being calculated with 0, so the container ends up halfway offscreen on the leftmost topmost monitor. Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
2024-08-21output: Chase wlroots!4803Alexander Orzechowski-1/+1
2024-08-19config/output: Skip search if config has a modeKenny Levinsen-3/+4
When doing an output configuration search, the intent is to only look for modes if the output's configuration does not contain a specific mode. This was done by testing if config_has_auto_mode returned false. config_has_auto_mode had its return values backwards, leading to other modes being tested if the output configuration had specified modes or modelines, leading to unwanted modes being selected. Invert the function to config_has_manual_mode to give it a clearer name, and fix the return values in the process.
2024-08-18config/output: Do not set adaptive_sync if not supportedKenny Levinsen-1/+1
After 4e38f93f367d ("config/output: Skip VRR tests when not supported"), the configuration search no longer touches VRR state for outputs that are known to not support it. This also means that it will not remove VRR if already set, which could cause output configuration to fail. Ensure that VRR state is never set for outputs that do not support it by adding the same test for support to queue_output_config. Fixes: 4e38f93f367d ("config/output: Skip VRR tests when not supported") Fixes: https://github.com/swaywm/sway/issues/8296
2024-08-14xdg-shell: chase xdg_surface geometry updatesKirill Primak-13/+8
2024-08-14output: Use wlr_scene_set_gamma_control_manager_v1Alexander Orzechowski-43/+2
2024-08-14output: Use wlr_scene_output_needs_frameAlexander Orzechowski-2/+1
2024-08-14commands/output/color_profile: allows use of relative path for ICC profileFelix Pehla-1/+13
2024-08-11Switch default config to wmenu-runSimon Ser-3/+1
This removes the last dependency bit on dmenu. No need for "swaymsg exec" anymore: wmenu-run handles the xdg-activation shenanigans.
2024-08-11Bind a few utilities to special keys in default configSimon Ser-0/+13
2024-08-09Add null-safety check for virtual keyboard keymapsJingMatrix-2/+12
Note that in the `sway_keyboard_configure` function of sway/input/keyboard.c, we have skipped the `sway_keyboard_set_layout` function for virtual keyboards, which then have null keymaps. Hence, a null-safety check is needed at runtime.
2024-08-07xwayland: Let scene restackAlexander Orzechowski-3/+0
2024-08-07tearing: fix UAF on destroyKirill Primak-0/+2
Fixes: 9a1c411abd8261c121dcd50dfe54132718768084
2024-08-07tearing: remove trailing whitespaceKirill Primak-16/+15
2024-08-06Add support for linux-drm-syncobj-v1Simon Ser-0/+6
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4262
2024-08-05Add support for tearing-control-v1Ricardo Steijn-3/+243
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3871 Adds option to allow tearing per output, as well as an option to force enable or disable tearing for a specific application using a window rule. Only works with fullscreen applications.
2024-08-04transaction: Reparent all container children when disabling for scratchpadAlexander Orzechowski-0/+9
Fixes: #8205
2024-08-03build: avoid git repository discovery when determining versionJames Knight-2/+2
When attempting to use Git to populate commit/branch information in a version string, it is possible through repository discovery that it uses Git information not relevant to project. For example, if repository content is extract into an interim build location when using an embedded build framework (e.g. Buildroot), the project will not have its Git repository to refer to. When it cannot find its repository, it will look into its parent folders and may find the Git repository of another project and use its branch/commit information. This commit provides an explicit path to the project's Git repository when consider commit/branch information. This will prevent any repository discovery from occurring. Signed-off-by: James Knight <james.d.knight@live.com>
2024-08-02xwayland: chase wlr_xwayland_surface_set_maximized() changeKirill Primak-1/+1
See https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4670.
2024-07-29desktop/xwayland: don't restack when marking window as inactiveSimon Ser-1/+3
daaec72ac01f ("desktop/xwayland: restack surface upon activation") has updated Sway for wlroots commit bfc69decdd04 ("xwm: do not restack surfaces on activation"). However, it unconditionally restacks the window above all other windows even if marking the window as inactive. Closes: https://github.com/swaywm/sway/issues/7974
2024-07-22layer-shell: Restore interactive layer focus codeJoan Bruguera Micó-0/+37
Commit 188811f80861 ("scene_graph: Port layer_shell") accidentally removed code in `arrange_layers` to handle focus on layer shell surfaces with keyboard interactivity. Due to this, layer shell surfaces requesting exclusive keyboard interactivity may not get automatically focused, and layer shell surfaces giving up exclusive keyboard interactivity can remain focused. Add the previous code back to fix the problem. Note the non-rename change included in b4d7e84d3852 ("desktop: Rename layers to shell_layers") is not included as it also seems accidental. Fixes: #7936
2024-07-14desktop/output: Stop repaint loop when not neededKenny Levinsen-0/+7
1e0031781fc9 refactored repaint to accumulate all changes in a single wlr_output_state and commit them at the end of the repaint loop, replacing a call to wlr_scene_output_commit. wlr_scene_output_commit contains an early bail-out when no frame has been requested and no damage has accumulated, which was not replicated as part of this refactor, causing the repaint loop to never pause. Replicate the logic to stop the repaint loop as needed. Fixes: 1e0031781fc9 ("desktop/output: unify page-flip codepath")
2024-07-14build: use fs.relative_to() instead of hand-rolled logicSimon Ser-24/+3
Meson has introduced a relative_to() function [1] in its fs module since version 1.3. [1]: https://mesonbuild.com/Fs-module.html#relative_to
2024-07-14ci: use package x11-servers/xwayland instead of x11-servers/xwayland-develBill Li-1/+1
2024-07-14Chase wlroots!2434Bill Li-10/+10
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/2434
2024-07-13build: Bump wlroots versionBill Li-2/+2
2024-07-10common/pango: Disable glyph position roundingKenny Levinsen-0/+3
Pango rounds glyph position and widths to nearest integer, which leads to font dimensions jumping around when rendering with a scale, causing text geometry to jump around when changing scale. This is disturbing when text buffers change scale, and also mean that the text geometry calculations in sway_text_node are incorrect. Disable this rounding to make the geometry stable.
2024-07-06xdg-activation: launcher tokens are activation requestsRonan Pigott-6/+6
If the launched client decides to pass it's token along as an activation request, allow that. This will make the behavior match tokens provided by an external launcher client.
2024-07-04build: bump libinput version requiredTarcísio Eduardo Moreira Crocomo-1/+1
2024-07-04Implement clickfinger_button_map support.Tarcísio Eduardo Moreira Crocomo-3/+74
2024-07-03sway_text_node: avoid unnecessary redrawsSimon Ser-0/+6
When a floating container has a titlebar, render_backing_buffer() ends up being called each time the container is moved. Add some more checks for no-op changes in sway_text_node_set_max_width() and sway_text_node_set_background(). This makes the move smoother.
2024-07-03tree/container: drop decl for container_update_textures_recursive()Simon Ser-2/+0
This function doesn't exist anymore.
2024-07-03xdg_shell: don't send configure events to uninitialized surfacesllyyr-3/+2
the surface isn't initialized yet when we first handle it in `handle_xdg_shell_toplevel`, move setting WM capabilities to handle_commit instead. Fixes warnings from wlroots about a configure being scheduled for uninitialized surface
2024-07-03ipc: properly check for titlebarsnovenary-1/+2
This fixes incorrect values for rect.y when using `hide_edge_borders --i3`.
2024-07-03transaction: fix missing top border with hide_lone_tabnovenary-2/+2
Regressed by scene graph.
2024-07-03desktop/output: Debounce modesetsKenny Levinsen-9/+25
Output changes often happen in rapid succession. Instead of doing the modesets one by one, set a 10 millisecond debounce timer.