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); 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; 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) {