From bd5fbcc6a43098dd28ff0b44ab8ca8a8a724d3b0 Mon Sep 17 00:00:00 2001 From: Marcus Fritzsch Date: Mon, 28 Aug 2017 13:14:56 +0200 Subject: [PATCH] WIP: dispatch sd_events, but break qt event handling Signed-off-by: Marcus Fritzsch --- AFBClient.cpp | 4 ++++ AFBClient.h | 1 + 2 files changed, 5 insertions(+) diff --git a/AFBClient.cpp b/AFBClient.cpp index 6f66a5f..fdfeca8 100644 --- a/AFBClient.cpp +++ b/AFBClient.cpp @@ -104,6 +104,10 @@ void AFBClient::activateSurface(const char *label) fflush(stdout); } +int AFBClient::dispatch() { + return sd_event_run(loop, -1); +} + void AFBClient::deactivateSurface(const char *label) { UNUSED(label); diff --git a/AFBClient.h b/AFBClient.h index 3961baf..c816e97 100644 --- a/AFBClient.h +++ b/AFBClient.h @@ -31,6 +31,7 @@ public: void activateSurface(const char *label); void deactivateSurface(const char *label); void endDraw(const char *label); + int dispatch(); static void onCall(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg); static void onEvent(void *closure, const char *event, struct afb_wsj1_msg *msg); -- 2.16.6