aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-03-29 22:32:17 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-03-29 22:32:17 -0400
commit095ac319214d6e51df223950292bfca5ddaf591a (patch)
treebc5afd3756ebf91f0e0722bad0b1e11fd2ddc7cf /swaybar
parentFix layer_surface_closed (diff)
downloadsway-095ac319214d6e51df223950292bfca5ddaf591a.tar.gz
sway-095ac319214d6e51df223950292bfca5ddaf591a.tar.zst
sway-095ac319214d6e51df223950292bfca5ddaf591a.zip
Use render_all_frames from bar_setup
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/bar.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/swaybar/bar.c b/swaybar/bar.c
index 82404d33..0fc41517 100644
--- a/swaybar/bar.c
+++ b/swaybar/bar.c
@@ -91,6 +91,13 @@ static const struct wl_registry_listener registry_listener = {
91 .global_remove = handle_global_remove, 91 .global_remove = handle_global_remove,
92}; 92};
93 93
94static void render_all_frames(struct swaybar *bar) {
95 struct swaybar_output *output;
96 wl_list_for_each(output, &bar->outputs, link) {
97 render_frame(bar, output);
98 }
99}
100
94void bar_setup(struct swaybar *bar, 101void bar_setup(struct swaybar *bar,
95 const char *socket_path, const char *bar_id) { 102 const char *socket_path, const char *bar_id) {
96 bar_init(bar); 103 bar_init(bar);
@@ -133,16 +140,7 @@ void bar_setup(struct swaybar *bar,
133 } 140 }
134 } 141 }
135 ipc_get_workspaces(bar); 142 ipc_get_workspaces(bar);
136 wl_list_for_each(output, &bar->outputs, link) { 143 render_all_frames(bar);
137 render_frame(bar, output);
138 }
139}
140
141static void render_all_frames(struct swaybar *bar) {
142 struct swaybar_output *output;
143 wl_list_for_each(output, &bar->outputs, link) {
144 render_frame(bar, output);
145 }
146} 144}
147 145
148static void display_in(int fd, short mask, void *_bar) { 146static void display_in(int fd, short mask, void *_bar) {