Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sway/commands/floating.c
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 0 additions & 6 deletions sway/criteria.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion sway/desktop/xdg_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down