From 0bf8731114f8b74d97066cd1d480ed1aad735163 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Sun, 10 May 2026 01:07:45 +0200 Subject: [PATCH 1/7] man: update drag_lock default ref. #8800 Fixes #9119 --- sway/sway-input.5.scd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/sway-input.5.scd b/sway/sway-input.5.scd index 18744a22a..389b20570 100644 --- a/sway/sway-input.5.scd +++ b/sway/sway-input.5.scd @@ -154,7 +154,7 @@ The following commands may only be used in the configuration file. *input* drag_lock enabled|disabled|enabled_sticky Enables or disables drag lock for specified input device. The default is - _enabled_sticky_. + _disabled_. *input* dwt enabled|disabled Enables or disables disable-while-typing for the specified input device. From 9c663b1fa1c2ef5c6df0427ba905f347f6594ab6 Mon Sep 17 00:00:00 2001 From: MATHIP6 <116129737+MATHIP6@users.noreply.github.com> Date: Wed, 13 May 2026 20:01:33 -0400 Subject: [PATCH 2/7] Fix typo in README.fr.md Corrected a typographical error in the documentation regarding the usage of 'man 5 sway'. Updated 'pour' to 'sur' for better clarity. --- README.fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.fr.md b/README.fr.md index c4ef699a4..a751a52cb 100644 --- a/README.fr.md +++ b/README.fr.md @@ -57,7 +57,7 @@ Si vous utilisez déjà i3, copiez votre configuration i3 vers `~/.config/sway/config` et sway fonctionnera directement. Sinon, copiez l'exemple de fichier de configuration vers `~/.config/sway/config`. Il se trouve généralement dans `/etc/sway/config`. Exécutez `man 5 sway` pour lire la -documentation pour la configuration de sway. +documentation sur la configuration de sway. ## Exécution From e52c14d535ff2956fb66374f36b7dda740eccbac Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Sat, 23 May 2026 10:16:11 +0200 Subject: [PATCH 3/7] i3-compat: swaybar: default to first bar-id When launching swaybar from the command line without a --bar-id flag, default to the first configured bar. This is a mirror of i3 PR https://github.com/i3/i3/pull/4231. This makes it easier to call swaybar from the command line since the majority of swaybar users have only one bar configured. --- swaybar/ipc.c | 22 ++++++++++++++++++++++ swaybar/main.c | 6 ------ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/swaybar/ipc.c b/swaybar/ipc.c index 68d8dd32d..c3929a35f 100644 --- a/swaybar/ipc.c +++ b/swaybar/ipc.c @@ -417,6 +417,28 @@ void ipc_execute_binding(struct swaybar *bar, struct swaybar_binding *bind) { } bool ipc_initialize(struct swaybar *bar) { + if (!bar->id) { + uint32_t len = 0; + char *res = ipc_single_command(bar->ipc_socketfd, + IPC_GET_BAR_CONFIG, "", &len); + json_object *bars = json_tokener_parse(res); + if (!json_object_is_type(bars, json_type_array) + || json_object_array_length(bars) == 0) { + sway_log(SWAY_ERROR, "No bar configuration found, " + "please configure a bar block in your sway config file."); + json_object_put(bars); + free(res); + return false; + } + json_object *first = json_object_array_get_idx(bars, 0); + bar->id = strdup(json_object_get_string(first)); + json_object_put(bars); + free(res); + sway_log(SWAY_INFO, "Using first bar config: %s. " + "Use --bar_id to manually select a different bar configuration.", + bar->id); + } + uint32_t len = strlen(bar->id); char *res = ipc_single_command(bar->ipc_socketfd, IPC_GET_BAR_CONFIG, bar->id, &len); diff --git a/swaybar/main.c b/swaybar/main.c index e1b0cecac..c2020ff09 100644 --- a/swaybar/main.c +++ b/swaybar/main.c @@ -72,12 +72,6 @@ int main(int argc, char **argv) { sway_log_init(SWAY_INFO, NULL); } - if (!swaybar.id) { - sway_log(SWAY_ERROR, "No bar_id passed. " - "Provide --bar_id or let sway start swaybar"); - return 1; - } - if (!socket_path) { socket_path = get_socketpath(); if (!socket_path) { From abb959602f063c4c4799456ff38f6b5aeb9b18f0 Mon Sep 17 00:00:00 2001 From: Scott Leggett Date: Fri, 22 May 2026 22:08:41 +0800 Subject: [PATCH 4/7] tree/workspace: fix unwrapping children to avoid redundant split Before this change, with `workspace_layout tabbed`, moving T[app app] to an empty workspace resulted in T[T[app] T[app]], as each child was individually wrapped in a new split container. It looks like commit 92891fb1 introduced workspace_unwrap_children to fix an issue where moving a tabbed/stacked container to a new workspace with workspace_layout tabbed would incorrectly nest the container, creating T[T[app app]]. However, workspace_unwrap_children used workspace_add_tiling to add the detached children to the workspace. Since commit ece6a1d4, workspace_add_tiling checks for a configured default_layout and if it finds one, calls container_split for every added window. This commit changes the unwrapping logic to use workspace_insert_tiling_direct instead of workspace_add_tiling, avoiding the default_layout splitting behaviour. --- sway/tree/workspace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c index 23311a456..9d78d7080 100644 --- a/sway/tree/workspace.c +++ b/sway/tree/workspace.c @@ -920,7 +920,7 @@ void workspace_unwrap_children(struct sway_workspace *ws, while (wrap->pending.children->length) { struct sway_container *child = wrap->pending.children->items[0]; container_detach(child); - workspace_add_tiling(ws, child); + workspace_insert_tiling_direct(ws, child, ws->tiling->length); } } From 3774506bd092563538af2b6d2e332c84a8ac153c Mon Sep 17 00:00:00 2001 From: Furkan Sahin Date: Mon, 27 Apr 2026 00:16:26 -0400 Subject: [PATCH 5/7] seatop_move_tiling: clamp edge thresholds to parent box When a fullscreen view is present on a workspace that has panels (e.g. a bar with exclusive zone), the view's content geometry extends beyond the workspace's usable area. The edge-detection thresholds computed from the view's content_x/content_width could then lie outside the parent container's box, causing the indicator width or height to become negative. This triggered an assertion in wlr_scene_rect_set_size. Fix this by clamping the threshold coordinates to the parent container's boundaries before using them to size the drop indicator. fixes #9102 --- sway/input/seatop_move_tiling.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sway/input/seatop_move_tiling.c b/sway/input/seatop_move_tiling.c index f19c3f18b..3a764d9ac 100644 --- a/sway/input/seatop_move_tiling.c +++ b/sway/input/seatop_move_tiling.c @@ -234,18 +234,22 @@ static void handle_motion_postthreshold(struct sway_seat *seat) { if (layout == L_HORIZ || layout == L_TABBED) { if (cursor->cursor->y < thresh_top) { edge = WLR_EDGE_TOP; + if (thresh_top < box.y) thresh_top = box.y; box.height = thresh_top - box.y; } else if (cursor->cursor->y > thresh_bottom) { edge = WLR_EDGE_BOTTOM; + if (thresh_bottom > box.y + box.height) thresh_bottom = box.y + box.height; box.height = box.y + box.height - thresh_bottom; box.y = thresh_bottom; } } else if (layout == L_VERT || layout == L_STACKED) { if (cursor->cursor->x < thresh_left) { edge = WLR_EDGE_LEFT; + if (thresh_left < box.x) thresh_left = box.x; box.width = thresh_left - box.x; } else if (cursor->cursor->x > thresh_right) { edge = WLR_EDGE_RIGHT; + if (thresh_right > box.x + box.width) thresh_right = box.x + box.width; box.width = box.x + box.width - thresh_right; box.x = thresh_right; } From 3cb86e4a2aa8e1938d97e54f15843c4e3dfbae27 Mon Sep 17 00:00:00 2001 From: Konstantin Pospelov Date: Sun, 3 May 2026 21:33:05 +0200 Subject: [PATCH 6/7] input/seat: check only the last output workspace on focus `seat_set_workspace_focus()` contains two references to the "last workspace": - `last_workspace` is the last focused workspace on all outputs. - `new_output_last_ws` is the last focused workspace on the new workspace output. They are the same when using a single output, but with multiple outputs they can diverge: `last_workspace` will be the focused workspace on the previous output, `new_output_last_ws` will be the previously focused workspace on the current output. This confusion seems to have led to #9139 when `last_workspace` was used instead of `new_output_last_ws`. However, we can safely drop `last_workspace` and use `new_output_last_ws` for everything that `seat_set_workspace_focus()` does: - Calling `node_set_dirty()` on the new output. - Calling `wlr_ext_workspace_handle_v1_set_active()` on the last workspace (this fixes #9139). - Skip `workspace_consider_destroy()` on `last_workspace`, since the other output still has it focused. This commit also renames `new_output_last_ws` to `last_workspace` to keep the name simple. --- sway/input/seat.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/sway/input/seat.c b/sway/input/seat.c index 83772f52c..0434d637c 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -1133,8 +1133,6 @@ static void seat_set_workspace_focus(struct sway_seat *seat, struct sway_node *n return; } - struct sway_workspace *last_workspace = seat_get_focused_workspace(seat); - if (node == NULL) { seat_send_unfocus(last_focus, seat); sway_input_method_relay_set_focus(&seat->im_relay, NULL); @@ -1157,17 +1155,15 @@ static void seat_set_workspace_focus(struct sway_seat *seat, struct sway_node *n return; } + // Find the output's last workspace, which might have to be removed if empty struct sway_output *new_output = new_workspace ? new_workspace->output : NULL; - + struct sway_workspace *last_workspace = + new_output ? output_get_active_workspace(new_output) : NULL; if (last_workspace != new_workspace && new_output) { node_set_dirty(&new_output->node); } - // find new output's old workspace, which might have to be removed if empty - struct sway_workspace *new_output_last_ws = - new_output ? output_get_active_workspace(new_output) : NULL; - // Unfocus the previous focus if (last_focus) { seat_send_unfocus(last_focus, seat); @@ -1211,11 +1207,11 @@ static void seat_set_workspace_focus(struct sway_seat *seat, struct sway_node *n } // Move sticky containers to new workspace - if (new_workspace && new_output_last_ws - && new_workspace != new_output_last_ws) { - for (int i = 0; i < new_output_last_ws->floating->length; ++i) { + if (new_workspace && last_workspace + && new_workspace != last_workspace) { + for (int i = 0; i < last_workspace->floating->length; ++i) { struct sway_container *floater = - new_output_last_ws->floating->items[i]; + last_workspace->floating->items[i]; if (container_is_sticky(floater)) { container_detach(floater); workspace_add_floating(new_workspace, floater); @@ -1244,13 +1240,9 @@ static void seat_set_workspace_focus(struct sway_seat *seat, struct sway_node *n } } - if (new_output_last_ws) { - workspace_consider_destroy(new_output_last_ws); - } - if (last_workspace && last_workspace != new_output_last_ws) { + if (last_workspace) { workspace_consider_destroy(last_workspace); } - seat->has_focus = true; if (config->smart_gaps && new_workspace) { From f1b40bc288f3be3bcc6a3c71f28ca9bb2529e70b Mon Sep 17 00:00:00 2001 From: Scott Leggett Date: Fri, 22 May 2026 23:03:31 +0800 Subject: [PATCH 7/7] seatop_move_tiling: fix stack overflow when dropping container into itself This change avoids a cyclic reference in the window tree when dragging a container and dropping it into one of its descendants. The drop target resolution logic previously only checked if the target node was the container itself, but missed checking if the target was a descendant of the dragged container. Fixes: #7949 --- sway/input/seatop_move_tiling.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sway/input/seatop_move_tiling.c b/sway/input/seatop_move_tiling.c index 3a764d9ac..025197852 100644 --- a/sway/input/seatop_move_tiling.c +++ b/sway/input/seatop_move_tiling.c @@ -256,8 +256,9 @@ static void handle_motion_postthreshold(struct sway_seat *seat) { } if (edge) { e->target_node = node_get_parent(&con->node); - if (e->target_node == &e->con->node) { - e->target_node = node_get_parent(e->target_node); + if (e->target_node && (e->target_node == &e->con->node || + node_has_ancestor(e->target_node, &e->con->node))) { + e->target_node = node_get_parent(&e->con->node); } e->target_edge = edge; update_indicator(e, &box);