aboutsummaryrefslogtreecommitdiff
path: root/swaybar/bar.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-03-29 22:32:17 -0400
committerDrew DeVault <sir@cmpwn.com>2018-03-29 22:32:17 -0400
commit095ac319214d6e51df223950292bfca5ddaf591a (patch)
treebc5afd3756ebf91f0e0722bad0b1e11fd2ddc7cf /swaybar/bar.c
parent6fe66d0e6c9a20a9dbe2d464671ff19ea5b0387c (diff)
Use render_all_frames from bar_setup
Diffstat (limited to 'swaybar/bar.c')
-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 = {
.global_remove = handle_global_remove,
};
+static void render_all_frames(struct swaybar *bar) {
+ struct swaybar_output *output;
+ wl_list_for_each(output, &bar->outputs, link) {
+ render_frame(bar, output);
+ }
+}
+
void bar_setup(struct swaybar *bar,
const char *socket_path, const char *bar_id) {
bar_init(bar);
@@ -133,16 +140,7 @@ void bar_setup(struct swaybar *bar,
}
}
ipc_get_workspaces(bar);
- wl_list_for_each(output, &bar->outputs, link) {
- render_frame(bar, output);
- }
-}
-
-static void render_all_frames(struct swaybar *bar) {
- struct swaybar_output *output;
- wl_list_for_each(output, &bar->outputs, link) {
- render_frame(bar, output);
- }
+ render_all_frames(bar);
}
static void display_in(int fd, short mask, void *_bar) {