summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/desktop/i3status-wrapper7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/desktop/i3status-wrapper b/scripts/desktop/i3status-wrapper
index cbfa3685..7b6087b4 100755
--- a/scripts/desktop/i3status-wrapper
+++ b/scripts/desktop/i3status-wrapper
@@ -109,7 +109,8 @@ unless (fork // warn "couldn't fork monitoring loop") {
# We have to go round the loop once more to find out if it's
# just a floating dialog that we'll ignore.
$last_e = $e;
- } elsif ($e->{change} && $e->{change} eq "floating"
+ } elsif ($e->{change} && exists $info{paper_ws}{$info{focused_ws}}
+ && $e->{change} eq "floating"
&& $e->{container}{type} ne "floating_con") {
# A container stopped floating -- it's as though it's new.
new_container($e);
@@ -189,8 +190,8 @@ unless (fork // warn "couldn't fork monitoring loop") {
# Workspace changes
elsif ($e->{change} && $e->{change} eq "focus" && $e->{current}) {
$info{focused_ws} = $e->{current}{id};
- } elsif ($e->{change} && $e->{change} eq "init"
- && $e->{current}) {
+ } elsif ($e->{change} && $e->{change} eq "init" && $e->{current}
+ && grep $_ eq $e->{current}{name}, @all_workspaces) {
$info{paper_ws}{$e->{current}{id}}
= { off_left => [], off_right => [],
ncols => 2, cols => [] };