aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorLines
2024-09-20sway/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> (cherry picked from commit f00f964abf0eae36a1cce03c532115319499e570)
2024-09-20config/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. (cherry picked from commit f9c0f043e5ec39574c9d9b0fb3dece6169a0e67d)
2024-09-20config/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 (cherry picked from commit ae7c1b139a3c71d3e11fe2477d8b21c36de6770e)
2024-09-20commands/output/color_profile: allows use of relative path for ICC profileFelix Pehla-1/+13
(cherry picked from commit 6576b99c243e2b66d077db0a99ec9683747e3fe9)
2024-09-20Switch 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. (cherry picked from commit b44015578a3d53cdd9436850202d4405696c1f52)
2024-09-20Bind a few utilities to special keys in default configSimon Ser-0/+13
(cherry picked from commit 9ba1beee580d07adfba903257ce8762b96ea3833)
2024-09-20Add 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. (cherry picked from commit f344e9d5a5afe6ba1aeaf781be3bd18dbf8596f1)
2024-09-20tearing: fix UAF on destroyKirill Primak-0/+2
Fixes: 9a1c411abd8261c121dcd50dfe54132718768084 (cherry picked from commit 32e5e5232d1b0b5a34b4296a79a4e8cfa32b5090)
2024-09-20tearing: remove trailing whitespaceKirill Primak-16/+15
(cherry picked from commit 3e956b922958b182912775497812cd42439b2955)
2024-09-20Add 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. (cherry picked from commit 9a1c411abd8261c121dcd50dfe54132718768084)
2024-09-20transaction: Reparent all container children when disabling for scratchpadAlexander Orzechowski-0/+9
Fixes: #8205 (cherry picked from commit b881c2e84c4be3c7b996f85200cfe391a7979267)
2024-09-20build: 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> (cherry picked from commit 6e4ccb99c3a2197468f8f34c290b7cd5612ff80b)
2024-09-20desktop/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 (cherry picked from commit 7e74a4914261cf32c45017521960adf7ff6dac8f)
2024-09-20layer-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 (cherry picked from commit 4d4c88f0a73f6ee3da1c99355f04362ef2ad68c9)
2024-07-17desktop/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") (cherry picked from commit 3f327b3db0c1fc6985c0ed3231e1bd6296584dad)
2024-07-17ci: use package x11-servers/xwayland instead of x11-servers/xwayland-develBill Li-1/+1
(cherry picked from commit 50073dc579fffffda8a4de903719b9bbb9d5ac3d)
2024-07-13ci: pin wlroots to v0.18.xSimon Ser-3/+3
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.
2024-07-03input/keyboard: don't set layout for virtual keyboard devicellyyr-1/+3
This prevents us from recompiling keymap every time a virtual device is created by clients like fcitx5
2024-07-03input/keyboard: refactor into sway_keyboard_set_layoutllyyr-36/+44
2024-07-03input/seat: don't send redundant leave/enter on device creationllyyr-2/+1
Fixes: #8143 #8173 Upstream issue: https://github.com/fcitx/fcitx5/issues/1044
2024-07-02input/keyboard: don't send key release if we don't have focused surfacellyyr-2/+3
"The compositor must not send this event if the wl_keyboard did not have an active surface immediately before this event. The compositor must not send this event if state is pressed (resp. released) and the key was already logically down (resp. was not logically down) immediately before this event." From https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/382
2024-07-02config/output: Skip VRR tests when not supportedKenny Levinsen-9/+6
Adaptive sync is a "soft" setting which we degrade of off when not supported. Some outputs types do not support turning it off (Wayland, X11), which makes for an awkward three-way test where we first enable, disable and finally unset the setting. wlr_output.adaptive_sync_supported tells us whether the output definitely does not support making changes (backend without support, connector without the feature), or whether it might work. Use this to avoid wasting time on adaptive sync test that can never succeed, and to avoid the Wayland/X11-backend specific unset step.
2024-07-01desktop/output: unify page-flip codepathSimon Ser-13/+12
Instead of having a special codepath for applying gamma LUTs, have a single codepath for regular page-flips and gamma LUT updates. Should make it easier to add more logic on top e.g. for tearing page-flips.
2024-06-29view: send scale notification when the output is knownRonan Pigott-0/+9
2024-06-27protocols: use tablet-v2 xml from stable/Kirill Primak-1/+1
2024-06-27prevent workspace_find_container from crashing with NULL workspacesbretello-0/+5
2024-06-27fix crash when setting urgency on an hidden scratchpad containerbretello-1/+1
2024-06-25tree/view: ensure content_{width,height} is positiveSimon Ser-2/+2
The size computations may result in a zero or negative size, which are not valid wl_surface sizes.
2024-06-25tree/view: set default min size to 1×1Simon Ser-2/+2
It's not possible to have a surface with a smaller size.
2024-06-10Set color transform when calling wlr_scene_output_build_state()Simon Ser-4/+6
We were only passing the color transform when calling wlr_scene_output_commit(). However when modesetting or pushing a new gamma LUT we render via wlr_scene_output_build_state(). Pass the color transform there as well.
2024-06-07sway/commands/output: Add command to set color profileManuel Stoeckl-1/+147
This makes it possible to render output buffers in a different color space, by specifying an ICC profile for the output.
2024-05-28Update for versioned wlroots filesViolet Purcell-1/+1
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4614
2024-05-27Drop server.h include from input/input-manager.hSimon Ser-1/+29
The only reason it's included there is for a declaration of struct sway_server, but we can just forward-declare it. This avoids rebuilding almost all of Sway when touching server.h. All other server.h includes are from source files, not headers.
2024-05-27input/text_input: ensure keyboard is set before sending modifiersSimon Ser-1/+3
Clients get confused when modifier events are sent before the keymap.
2024-05-27server: hide xdg_output from unprivileged clientsSimon Ser-2/+6
Regular Wayland clients shouldn't care about the position or size of outputs. Hide xdg_output from unprivileged clients to make sure they're not doing shenanigans with this information.
2024-05-24tree/view: Do not clip to geometry if using CSDthal-6/+13
If a floating window is using CSD, the geometry should not be used to define the clipping region. Otherwise drop shadows and such may be clipped excessively.
2024-05-21build: drop xwayland optionSimon Ser-59/+56
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-05-18sway/config/output.c: fix null deref on output configAnna (navi) Figueiredo Gomes-1/+1
If there's no config for the output, oc is null, but some screens might have a default rotation, causing the log call to dereference a null pointer. Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
2024-05-18build: disable wayland-protocols subproject tests by defaultSimon Ser-1/+1
2024-05-07desktop/layer_shell: provide fractional scale on creationManuel Stoeckl-0/+7
Also, send a matching wl_surface.preferred_buffer_scale event.