diff options
author | D.B <thejan.2009@gmail.com> | 2016-08-05 10:43:54 +0200 |
---|---|---|
committer | D.B <thejan.2009@gmail.com> | 2016-08-05 10:43:54 +0200 |
commit | aa292db8d1000785d743c41552d4a27e8a2f5595 (patch) | |
tree | f7545e019692feae1c8565f2b92d13c5c1a383be | |
parent | Merge pull request #837 from acrisci/feature/log-events (diff) | |
download | sway-aa292db8d1000785d743c41552d4a27e8a2f5595.tar.gz sway-aa292db8d1000785d743c41552d4a27e8a2f5595.tar.zst sway-aa292db8d1000785d743c41552d4a27e8a2f5595.zip |
Fix switch to prev ws on handle_view_created
Switching back to original workspace should be done only if workspace
was switched while appending new view.
-rw-r--r-- | sway/handlers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 6d35f8a2..846d0005 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -410,7 +410,7 @@ static bool handle_view_created(wlc_handle handle) { | |||
410 | } | 410 | } |
411 | wlc_view_set_mask(handle, VISIBLE); | 411 | wlc_view_set_mask(handle, VISIBLE); |
412 | 412 | ||
413 | if (return_to_workspace && current_ws) { | 413 | if (return_to_workspace && current_ws != swayc_active_workspace()) { |
414 | // we were on one workspace, switched to another to add this view, | 414 | // we were on one workspace, switched to another to add this view, |
415 | // now let's return to where we were | 415 | // now let's return to where we were |
416 | workspace_switch(current_ws); | 416 | workspace_switch(current_ws); |