diff options
author | 2017-09-12 11:29:28 +0200 | |
---|---|---|
committer | 2017-09-12 11:29:28 +0200 | |
commit | 83555b0c53f0d59f42e9dcfaeb269948e65e0391 (patch) | |
tree | 22fddeac914640de0f9a47ed2cc9e90a2231e42b /src/main.cpp | |
parent | b154238b7b9e0d21b60c08a1bec23920bff40e36 (diff) |
binding: make the pending_events functionality nicer[tm]
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index aee2756..f14cf96 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -65,13 +65,17 @@ int display_event_callback(sd_event_source *evs, int fd, uint32_t events, { STN(display_read_events); g_afb_instance->app.display->read_events(); - g_afb_instance->app.pending_events.store(true, std::memory_order_release); + g_afb_instance->app.set_pending_events(); } { + // We want do dispatch pending wayland events from within + // the API context STN(winman_ping_api_call); - afb_service_call("winman", "ping", json_object_new_object(), [](void *c, int st, json_object* j) { - STN(winman_ping_api_call_return); - }, nullptr); + afb_service_call("winman", "ping", json_object_new_object(), + [](void *c, int st, json_object *j) { + STN(winman_ping_api_call_return); + }, + nullptr); } } |