diff options
| author | Drew DeVault <[email protected]> | 2018-10-23 14:19:11 +0200 | 
|---|---|---|
| committer | GitHub <[email protected]> | 2018-10-23 14:19:11 +0200 | 
| commit | 7160b8aae90694e039de8d5a9341d18c89bf3c6d (patch) | |
| tree | aa009cb65a9b7242dff51cd04b10f0f7b7beb5de /swaybar | |
| parent | 862a4f69bed4ef32a67798f04a73d7006a67160a (diff) | |
| parent | 48cf430ceee7a301059d070d719504dd21e3d381 (diff) | |
Merge pull request #2942 from ianyfan/swaybar
swaybar: absorb bar_init function into bar_setup
Diffstat (limited to 'swaybar')
| -rw-r--r-- | swaybar/bar.c | 10 | 
1 files changed, 3 insertions, 7 deletions
| diff --git a/swaybar/bar.c b/swaybar/bar.c index 1439a11c..88de8c04 100644 --- a/swaybar/bar.c +++ b/swaybar/bar.c @@ -26,11 +26,6 @@  #include "wlr-layer-shell-unstable-v1-client-protocol.h"  #include "xdg-output-unstable-v1-client-protocol.h" -static void bar_init(struct swaybar *bar) { -	bar->config = init_config(); -	wl_list_init(&bar->outputs); -} -  void free_workspaces(struct wl_list *list) {  	struct swaybar_workspace *ws, *tmp;  	wl_list_for_each_safe(ws, tmp, list, link) { @@ -327,7 +322,9 @@ static const struct wl_registry_listener registry_listener = {  };  bool bar_setup(struct swaybar *bar, const char *socket_path) { -	bar_init(bar); +	bar->visible = true; +	bar->config = init_config(); +	wl_list_init(&bar->outputs);  	bar->eventloop = loop_create();  	bar->ipc_socketfd = ipc_open_socket(socket_path); @@ -376,7 +373,6 @@ bool bar_setup(struct swaybar *bar, const char *socket_path) {  	pointer->cursor_surface = wl_compositor_create_surface(bar->compositor);  	assert(pointer->cursor_surface); -	bar->visible = true;  	if (bar->config->workspace_buttons) {  		ipc_get_workspaces(bar);  	} | 
