diff options
-rw-r--r-- | src/main.cpp | 15 | ||||
-rw-r--r-- | src/util.hpp | 1 |
2 files changed, 6 insertions, 10 deletions
diff --git a/src/main.cpp b/src/main.cpp index ed71152..4adf2f8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -199,15 +199,6 @@ int binding_init() noexcept { return -1; } -#define CHECK_WAYLAND() \ - do { \ - if (g_wayland == nullptr) { \ - afb_req_fail(req, "failed", \ - "Binding not initialized, did the compositor die?"); \ - return; \ - } \ - } while (0) - // _ _ _ _ ____ // __| | ___| |__ _ _ __ _ ___| |_ __ _| |_ _ _ ___ / /\ \ // / _` |/ _ \ '_ \| | | |/ _` | / __| __/ _` | __| | | / __| | | | @@ -238,7 +229,11 @@ void debug_layers(afb_req req) { #define WRAP(F) \ [](afb_req req) noexcept { \ - CHECK_WAYLAND(); \ + if (g_wayland == nullptr) { \ + afb_req_fail(req, "failed", \ + "Binding not initialized, did the compositor die?"); \ + return; \ + } \ try { \ F(req); \ } catch (std::exception & e) { \ diff --git a/src/util.hpp b/src/util.hpp index 253f656..84c2462 100644 --- a/src/util.hpp +++ b/src/util.hpp @@ -3,6 +3,7 @@ #include <functional> #include <sys/poll.h> + #include <vector> extern "C" { |