From deb9105d3e2718da2e0fbe5c725c197d2975a9e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 29 Jan 2019 21:37:38 +0100 Subject: [PATCH] main: move xcb_init() call to bar's XCB backend --- bar/xcb.c | 1 + main.c | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/bar/xcb.c b/bar/xcb.c index a27b34f..db854dc 100644 --- a/bar/xcb.c +++ b/bar/xcb.c @@ -34,6 +34,7 @@ struct xcb_backend { void * bar_backend_xcb_new(void) { + xcb_init(); return calloc(1, sizeof(struct xcb_backend)); } diff --git a/main.c b/main.c index fd1c00c..8a35854 100644 --- a/main.c +++ b/main.c @@ -17,7 +17,6 @@ #include "bar.h" #include "config.h" #include "yml.h" -#include "xcb.h" #define LOG_MODULE "main" #include "log.h" @@ -121,8 +120,6 @@ main(int argc, const char *const *argv) return 1; } - xcb_init(); - bar->abort_fd = abort_fd; thrd_t bar_thread;