summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generate-binding-glue.py2
-rw-r--r--src/main.cpp5
2 files changed, 3 insertions, 4 deletions
diff --git a/generate-binding-glue.py b/generate-binding-glue.py
index db0b546..086ad32 100644
--- a/generate-binding-glue.py
+++ b/generate-binding-glue.py
@@ -49,7 +49,7 @@ def emit_func_impl(api, f):
def emit_func(api, f):
p('void %(impl_name)s(afb_req req) noexcept {' % f)
- #p(' std::lock_guard<std::mutex> guard(binding_m);')
+ p(' std::lock_guard<std::mutex> guard(binding_m);')
p(' #ifdef ST')
p(' ST();')
p(' #endif')
diff --git a/src/main.cpp b/src/main.cpp
index 4bb53b3..4c04f74 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -30,7 +30,7 @@ extern "C" {
}
namespace {
-//std::mutex binding_m;
+std::mutex binding_m;
struct afb_instance {
std::unique_ptr<wl::display> display;
@@ -54,7 +54,6 @@ int afb_instance::init() {
int display_event_callback(sd_event_source *evs, int fd, uint32_t events,
void * /*data*/) {
ST();
- // std::lock_guard<std::mutex> guard(binding_m);
if ((events & EPOLLHUP) != 0) {
logerror("The compositor hung up, dying now.");
@@ -156,4 +155,4 @@ void binding_api::send_event(char const *evname, char const *label) {
}
extern "C" const struct afb_binding_v2 afbBindingV2 = {
- "winman", nullptr, nullptr, winman_verbs, nullptr, binding_init, nullptr, 1};
+ "winman", nullptr, nullptr, winman_verbs, nullptr, binding_init, nullptr, 0};