This commit is contained in:
Furkan Sahin 2026-02-04 09:02:24 +07:00 committed by GitHub
commit 0214066a2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 7 deletions

View file

@ -1,6 +1,7 @@
#include <string.h>
#include <strings.h>
#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);

View file

@ -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;

View file

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