diff options
Diffstat (limited to 'src/app.hpp')
-rw-r--r-- | src/app.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/app.hpp b/src/app.hpp index e295797..c4c0a81 100644 --- a/src/app.hpp +++ b/src/app.hpp @@ -148,7 +148,16 @@ struct App { struct LayoutState state; + // Set by AFB API when wayland events need to be dispatched std::atomic<bool> pending_events; + void set_pending_events() { + this->pending_events.store(true, std::memory_order_release); + } + bool pop_pending_events() { + bool x{true}; + return this->pending_events.compare_exchange_strong( + x, false, std::memory_order_consume); + } explicit App(wl::display *d); ~App(); |