From df130bede0a6e1ef70a4c8971160605cd1e3afa9 Mon Sep 17 00:00:00 2001 From: Furkan Sahin Date: Thu, 23 Oct 2025 14:03:36 -0400 Subject: [PATCH 1/3] xdg-shell: dont overwrite for_window scratchpad geometry this handle_commit causes containers in the scratchpad to have their `for_window` resize geometry get reset by natural geometry. A for_window ... resize directive's call to schedule ends up overwritten by this commit with natural geometry values. --- sway/desktop/xdg_shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index 7217e1369..e730d0090 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c @@ -321,7 +321,7 @@ static void handle_commit(struct wl_listener *listener, void *data) { // containers, we resize the container to match. For tiling containers, // we only recenter the surface. memcpy(&view->geometry, new_geo, sizeof(struct wlr_box)); - if (container_is_floating(view->container)) { + if (container_is_floating(view->container) && !container_is_scratchpad_hidden(view->container)) { view_update_size(view); // Only set the toplevel size the current container actually has a size. if (view->container->current.width) { From 60aa6aec0c7dfa243b3165ecac56244da3452557 Mon Sep 17 00:00:00 2001 From: Furkan Sahin Date: Fri, 24 Oct 2025 19:54:07 -0400 Subject: [PATCH 2/3] fix for_window[floating] criteria floating criteria get parsed and added to the config criteria list but rejected by 1e9aaa54 --- sway/criteria.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sway/criteria.c b/sway/criteria.c index e200d4c8f..a376c9d03 100644 --- a/sway/criteria.c +++ b/sway/criteria.c @@ -415,12 +415,6 @@ static bool criteria_matches_view(struct criteria *criteria, } #endif - if (criteria->floating) { - if (!container_is_floating(view->container)) { - return false; - } - } - if (criteria->tiling) { if (container_is_floating(view->container)) { return false; From 554605bf99440f0234067e6e238c0d52f7fd014b Mon Sep 17 00:00:00 2001 From: Furkan Sahin Date: Sat, 25 Oct 2025 15:27:53 -0400 Subject: [PATCH 3/3] commands/floating: commit changes forces for_window floating enable to render immediately rather than on mouse click / keyboard focus. fixes #8711 --- sway/commands/floating.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sway/commands/floating.c b/sway/commands/floating.c index 74f6522c7..e7e37fa5f 100644 --- a/sway/commands/floating.c +++ b/sway/commands/floating.c @@ -1,6 +1,7 @@ #include #include #include "sway/commands.h" +#include "sway/desktop/transaction.h" #include "sway/input/seat.h" #include "sway/ipc-server.h" #include "sway/output.h" @@ -53,6 +54,7 @@ struct cmd_results *cmd_floating(int argc, char **argv) { // Floating containers in the scratchpad should be ignored if (container->pending.workspace) { arrange_workspace(container->pending.workspace); + transaction_commit_dirty(); } return cmd_results_new(CMD_SUCCESS, NULL);