X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fapp.hpp;h=c4c0a8151d2d511c27f8259dc3ea6d3d90e1ac22;hb=83555b0c53f0d59f42e9dcfaeb269948e65e0391;hp=e2957973c0118f74c8425e5922deca4852e87bf9;hpb=b154238b7b9e0d21b60c08a1bec23920bff40e36;p=staging%2Fwindowmanager.git 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 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();