aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-11-29 09:10:29 -0500
committerDrew DeVault <sir@cmpwn.com>2015-11-29 09:10:29 -0500
commit9d2bbe26400357b8b741a5b10767af6f84cc8867 (patch)
tree1f3d7884ac231fcf65f24fc634cbdef8670d7fac /sway
parent25ad3181f5850d9e27befc9cd829ad25baefcd0b (diff)
parentbadfb4bb43f18694a584f47e81ef4f2206b442bb (diff)
downloadsway-9d2bbe26400357b8b741a5b10767af6f84cc8867.tar.xz
Merge pull request #274 from sce/fix_stray_floats
cmd_floating: Don't add non-float as sibling to float.
Diffstat (limited to 'sway')
-rw-r--r--sway/commands.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sway/commands.c b/sway/commands.c
index e00cc94d..ba42a9ae 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -344,14 +344,12 @@ static struct cmd_results *cmd_floating(int argc, char **argv) {
} else if (view->is_floating && !wants_floating) {
// Delete the view from the floating list and unset its is_floating flag
- // Using length-1 as the index is safe because the view must be the currently
- // focused floating output
remove_child(view);
view->is_floating = false;
// Get the properly focused container, and add in the view there
swayc_t *focused = container_under_pointer();
// If focused is null, it's because the currently focused container is a workspace
- if (focused == NULL) {
+ if (focused == NULL || focused->is_floating) {
focused = swayc_active_workspace();
}
set_focused_container(focused);