aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorLines
2024-06-29sway/commands/move.c: arrange new workspaceFurkan Sahin-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!4803Furkan Sahin-1/+1
2024-08-19config/output: Skip search if config has a modeFurkan Sahin-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 supportedFurkan Sahin-1/+1
After 622be4526a93 ("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: 622be4526a93 ("config/output: Skip VRR tests when not supported") Fixes: https://github.com/swaywm/sway/issues/8296
2024-08-14xdg-shell: chase xdg_surface geometry updatesFurkan Sahin-13/+8
2024-08-14output: Use wlr_scene_set_gamma_control_manager_v1Furkan Sahin-43/+2
2024-08-14output: Use wlr_scene_output_needs_frameFurkan Sahin-2/+1
2024-08-07commands/output/color_profile: allows use of relative path for ICC profileFurkan Sahin-1/+13
2024-08-11Switch default config to wmenu-runFurkan Sahin-3/+1
This removes the last dependency bit on dmenu. No need for "swaymsg exec" anymore: wmenu-run handles the xdg-activation shenanigans.
2024-02-29Bind a few utilities to special keys in default configFurkan Sahin-0/+13
2024-08-09Add null-safety check for virtual keyboard keymapsFurkan Sahin-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 restackFurkan Sahin-3/+0
2024-08-07tearing: fix UAF on destroyFurkan Sahin-0/+2
Fixes: 37d3937789deb322d2d4de7a13ace3202520026a
2024-08-07tearing: remove trailing whitespaceFurkan Sahin-16/+15
2024-05-10Add support for linux-drm-syncobj-v1Furkan Sahin-0/+6
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4262
2024-08-05Add support for tearing-control-v1Furkan Sahin-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-07-10transaction: Reparent all container children when disabling for scratchpadFurkan Sahin-0/+9
Fixes: #8205
2024-08-03build: avoid git repository discovery when determining versionFurkan Sahin-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() changeFurkan Sahin-1/+1
See https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4670.
2024-07-29desktop/xwayland: don't restack when marking window as inactiveFurkan Sahin-1/+3
0afc041a7bbe ("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-20layer-shell: Restore interactive layer focus codeFurkan Sahin-0/+37
Commit f2f4af868bfa ("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 3e58196b0a07 ("desktop: Rename layers to shell_layers") is not included as it also seems accidental. Fixes: #7936
2024-07-15desktop/output: Stop repaint loop when not neededFurkan Sahin-0/+7
4d52204b308b 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: 4d52204b308b ("desktop/output: unify page-flip codepath")
2024-07-14build: use fs.relative_to() instead of hand-rolled logicFurkan Sahin-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-15ci: use package x11-servers/xwayland instead of x11-servers/xwayland-develFurkan Sahin-1/+1
2024-07-14Chase wlroots!2434Furkan Sahin-10/+10
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/2434
2024-07-13build: Bump wlroots versionFurkan Sahin-2/+2
2024-07-11common/pango: Disable glyph position roundingFurkan Sahin-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-02-28xdg-activation: launcher tokens are activation requestsFurkan Sahin-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 requiredFurkan Sahin-1/+1
2024-04-10Implement clickfinger_button_map support.Furkan Sahin-3/+74
2024-07-04sway_text_node: avoid unnecessary redrawsFurkan Sahin-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()Furkan Sahin-2/+0
This function doesn't exist anymore.
2024-07-04xdg_shell: don't send configure events to uninitialized surfacesFurkan Sahin-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
2023-12-28ipc: properly check for titlebarsFurkan Sahin-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_tabFurkan Sahin-2/+2
Regressed by scene graph.
2024-03-28desktop/output: Debounce modesetsFurkan Sahin-9/+25
Output changes often happen in rapid succession. Instead of doing the modesets one by one, set a 10 millisecond debounce timer.
2024-05-26input/keyboard: don't set layout for virtual keyboard deviceFurkan Sahin-1/+3
This prevents us from recompiling keymap every time a virtual device is created by clients like fcitx5
2024-05-26input/keyboard: refactor into sway_keyboard_set_layoutFurkan Sahin-36/+44
2024-05-25input/seat: don't send redundant leave/enter on device creationFurkan Sahin-2/+1
Fixes: #8143 #8173 Upstream issue: https://github.com/fcitx/fcitx5/issues/1044
2024-05-27input/keyboard: don't send key release if we don't have focused surfaceFurkan Sahin-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 supportedFurkan Sahin-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 codepathFurkan Sahin-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.
2023-07-31view: send scale notification when the output is knownFurkan Sahin-0/+9
2024-06-27protocols: use tablet-v2 xml from stable/Furkan Sahin-1/+1
2024-06-27prevent workspace_find_container from crashing with NULL workspacesFurkan Sahin-0/+5
2024-06-27fix crash when setting urgency on an hidden scratchpad containerFurkan Sahin-1/+1
2024-06-24tree/view: ensure content_{width,height} is positiveFurkan Sahin-2/+2
The size computations may result in a zero or negative size, which are not valid wl_surface sizes.
2024-06-24tree/view: set default min size to 1×1Furkan Sahin-2/+2
It's not possible to have a surface with a smaller size.
2024-06-08Set color transform when calling wlr_scene_output_build_state()Furkan Sahin-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.
2023-07-17sway/commands/output: Add command to set color profileFurkan Sahin-1/+147
This makes it possible to render output buffers in a different color space, by specifying an ICC profile for the output.