diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-11-29 09:10:29 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-11-29 09:10:29 -0500 |
commit | 9d2bbe26400357b8b741a5b10767af6f84cc8867 (patch) | |
tree | 1f3d7884ac231fcf65f24fc634cbdef8670d7fac | |
parent | Merge pull request #276 from sce/earlier_logging (diff) | |
parent | cmd_floating: Don't add non-float as sibling to float. (diff) | |
download | sway-9d2bbe26400357b8b741a5b10767af6f84cc8867.tar.gz sway-9d2bbe26400357b8b741a5b10767af6f84cc8867.tar.zst sway-9d2bbe26400357b8b741a5b10767af6f84cc8867.zip |
Merge pull request #274 from sce/fix_stray_floats
cmd_floating: Don't add non-float as sibling to float.
-rw-r--r-- | sway/commands.c | 4 |
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) { | |||
344 | 344 | ||
345 | } else if (view->is_floating && !wants_floating) { | 345 | } else if (view->is_floating && !wants_floating) { |
346 | // Delete the view from the floating list and unset its is_floating flag | 346 | // Delete the view from the floating list and unset its is_floating flag |
347 | // Using length-1 as the index is safe because the view must be the currently | ||
348 | // focused floating output | ||
349 | remove_child(view); | 347 | remove_child(view); |
350 | view->is_floating = false; | 348 | view->is_floating = false; |
351 | // Get the properly focused container, and add in the view there | 349 | // Get the properly focused container, and add in the view there |
352 | swayc_t *focused = container_under_pointer(); | 350 | swayc_t *focused = container_under_pointer(); |
353 | // If focused is null, it's because the currently focused container is a workspace | 351 | // If focused is null, it's because the currently focused container is a workspace |
354 | if (focused == NULL) { | 352 | if (focused == NULL || focused->is_floating) { |
355 | focused = swayc_active_workspace(); | 353 | focused = swayc_active_workspace(); |
356 | } | 354 | } |
357 | set_focused_container(focused); | 355 | set_focused_container(focused); |