binding: manual lock on API call, do not use noconcurrent bit
[staging/windowmanager.git] / src / main.cpp
index 4bb53b3..4c04f74 100644 (file)
@@ -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};