Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
-#define CHECK_WAYLAND() \
- do { \
- if (g_wayland == nullptr) { \
- afb_req_fail(req, "failed", \
- "Binding not initialized, did the compositor die?"); \
- return; \
- } \
- } while (0)
-
// _ _ _ _ ____
// __| | ___| |__ _ _ __ _ ___| |_ __ _| |_ _ _ ___ / /\ \
// / _` |/ _ \ '_ \| | | |/ _` | / __| __/ _` | __| | | / __| | | |
// _ _ _ _ ____
// __| | ___| |__ _ _ __ _ ___| |_ __ _| |_ _ _ ___ / /\ \
// / _` |/ _ \ '_ \| | | |/ _` | / __| __/ _` | __| | | / __| | | |
#define WRAP(F) \
[](afb_req req) noexcept { \
#define WRAP(F) \
[](afb_req req) noexcept { \
+ if (g_wayland == nullptr) { \
+ afb_req_fail(req, "failed", \
+ "Binding not initialized, did the compositor die?"); \
+ return; \
+ } \
try { \
F(req); \
} catch (std::exception & e) { \
try { \
F(req); \
} catch (std::exception & e) { \
#include <functional>
#include <sys/poll.h>
#include <functional>
#include <sys/poll.h>
#include <vector>
extern "C" {
#include <vector>
extern "C" {