aboutsummaryrefslogtreecommitdiff
path: root/sway/handlers.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2016-06-21 14:14:16 -0400
committerGitHub <noreply@github.com>2016-06-21 14:14:16 -0400
commitb5818150b959eb57ac400799f6c3ba017736485e (patch)
tree01e6597b06f11bab6c6e905a3edc42430aa9b5ea /sway/handlers.c
parent71f710cf0f1c4039f0623d5e149c077c0aa25dc5 (diff)
parentbfdda1505ec319b9ee812efa7059d646f7bea9d0 (diff)
downloadsway-b5818150b959eb57ac400799f6c3ba017736485e.tar.xz
Merge pull request #720 from Hummer12007/exec_fix
Check if found ws is focused in new view handler
Diffstat (limited to 'sway/handlers.c')
-rw-r--r--sway/handlers.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index b38f05a6..c5aee4aa 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -198,11 +198,12 @@ static bool handle_view_created(wlc_handle handle) {
if (pid) {
// using newview as a temp storage location here,
// rather than adding yet another workspace var
- if ((newview = workspace_for_pid(pid))) {
+ newview = workspace_for_pid(pid);
+ if (newview && newview != current_ws) {
focused = newview;
- newview = NULL;
return_to_workspace = true;
}
+ newview = NULL;
}
}