aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Fan <ianfan0@gmail.com>2018-10-12 21:17:32 +0100
committerIan Fan <ianfan0@gmail.com>2018-10-14 13:33:12 +0100
commita388ffa12776cfad11c13f0bc0b60a5face38a9b (patch)
tree6f4a6951e999447bd950e0c133b7fe8a1f3966e6
parent19f0bf38640f4da609782442c901366617aa27fa (diff)
swaybar: only send initial workspace request if workspace buttons are enabled
-rw-r--r--swaybar/bar.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/swaybar/bar.c b/swaybar/bar.c
index e6c5f2f1..ecf1bf82 100644
--- a/swaybar/bar.c
+++ b/swaybar/bar.c
@@ -567,8 +567,11 @@ bool bar_setup(struct swaybar *bar, const char *socket_path) {
pointer->cursor_surface = wl_compositor_create_surface(bar->compositor);
assert(pointer->cursor_surface);
- ipc_get_workspaces(bar);
- set_bar_dirty(bar);
+ if (bar->config->workspace_buttons) {
+ if (ipc_get_workspaces(bar)) {
+ set_bar_dirty(bar);
+ }
+ }
return true;
}