Code Review
/
staging
/
windowmanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
binding: make the pending_events functionality nicer[tm]
[staging/windowmanager.git]
/
src
/
app.hpp
diff --git
a/src/app.hpp
b/src/app.hpp
index
e295797
..
c4c0a81
100644
(file)
--- a/
src/app.hpp
+++ b/
src/app.hpp
@@
-148,7
+148,16
@@
struct App {
struct LayoutState state;
struct LayoutState state;
+ // Set by AFB API when wayland events need to be dispatched
std::atomic<bool> pending_events;
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();
explicit App(wl::display *d);
~App();