From 69722bae48c1670e1ce771c92b74cb65ef799110 Mon Sep 17 00:00:00 2001 From: Raphael Robatsch Date: Sat, 30 Oct 2021 11:55:35 +0200 Subject: [PATCH] style: config --- src/config.def.hpp | 5 +++-- src/main.cpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/config.def.hpp b/src/config.def.hpp index 788cfa2..40a8c95 100644 --- a/src/config.def.hpp +++ b/src/config.def.hpp @@ -10,11 +10,12 @@ constexpr int paddingX = 10; constexpr int paddingY = 3; // See https://docs.gtk.org/Pango/type_func.FontDescription.from_string.html -constexpr const char *font = "Sans 12"; +constexpr const char* font = "Sans 12"; constexpr ColorScheme colorInactive = {Color(0xbb, 0xbb, 0xbb), Color(0x22, 0x22, 0x22)}; constexpr ColorScheme colorActive = {Color(0xee, 0xee, 0xee), Color(0x00, 0x55, 0x77)}; -constexpr const char *termcmd[] = {"foot", nullptr}; +constexpr const char* termcmd[] = {"foot", nullptr}; + static std::vector tagNames = { "1", "2", "3", "4", "5", "6", diff --git a/src/main.cpp b/src/main.cpp index 15d6c75..e77c11f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -188,6 +188,8 @@ static const struct wl_seat_listener seatListener = { void setupMonitor(Monitor& monitor) { monitor.bar.emplace(&monitor); monitor.bar->setStatus(lastStatus); + auto xdgOutput = zxdg_output_manager_v1_get_xdg_output(xdgOutputManager, monitor.wlOutput.get()); + zxdg_output_v1_add_listener(xdgOutput, &xdgOutputListener, &monitor); } void updatemon(Monitor& mon) @@ -389,8 +391,6 @@ void onGlobalAdd(void*, wl_registry* registry, uint32_t name, const char* interf } if (wl_output *output; reg.handle(output, wl_output_interface, 1)) { auto& m = monitors.emplace_back(Monitor {name, {}, wl_unique_ptr {output}}); - auto xdgOutput = zxdg_output_manager_v1_get_xdg_output(xdgOutputManager, m.wlOutput.get()); - zxdg_output_v1_add_listener(xdgOutput, &xdgOutputListener, &m); if (ready) { setupMonitor(m); }