aboutsummaryrefslogtreecommitdiff
path: root/swaybar
diff options
context:
space:
mode:
authorBill Doyle <vil@vil.lv>2020-02-26 23:36:14 -0500
committerDrew DeVault <sir@cmpwn.com>2020-02-27 15:34:49 +0100
commit920d85d35fa09098a929c1ac8a21e4bbcfa09d0d (patch)
treebb8356efa421af52fe2e6ed2229af02eb860840d /swaybar
parent2045ac3472196d6839569bccd436cde45ef6ca61 (diff)
Only destroy swaybar surface via ipc when needed
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/ipc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/swaybar/ipc.c b/swaybar/ipc.c
index cca510c6..a3a9b495 100644
--- a/swaybar/ipc.c
+++ b/swaybar/ipc.c
@@ -528,8 +528,10 @@ static bool handle_barconfig_update(struct swaybar *bar, const char *payload,
ipc_get_workspaces(bar);
}
+ bool moving_layer = strcmp(oldcfg->mode, newcfg->mode) != 0;
+
free_config(oldcfg);
- determine_bar_visibility(bar, true);
+ determine_bar_visibility(bar, moving_layer);
return true;
}