aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp65
1 files changed, 16 insertions, 49 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5990e99..7677f14 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -61,7 +61,7 @@ int afb_instance::init()
int display_event_callback(sd_event_source *evs, int /*fd*/, uint32_t events,
void * /*data*/)
{
- ST();
+ ;
if ((events & EPOLLHUP) != 0)
{
@@ -74,19 +74,14 @@ int display_event_callback(sd_event_source *evs, int /*fd*/, uint32_t events,
if ((events & EPOLLIN) != 0u)
{
{
- STN(display_read_events);
g_afb_instance->wmgr.display->read_events();
g_afb_instance->wmgr.set_pending_events();
}
{
// We want do dispatch pending wayland events from within
// the API context
- STN(winman_ping_api_call);
afb_service_call("windowmanager", "ping", json_object_new_object(),
- [](void *c, int st, json_object *j) {
- STN(winman_ping_api_call_return);
- },
- nullptr);
+ [](void *c, int st, json_object *j) {}, nullptr);
}
}
@@ -212,9 +207,7 @@ static void createSecurityContext(afb_req req, const char* appid, const char* ro
void windowmanager_requestsurface(afb_req req) noexcept
{
std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
- ST();
-#endif
+
if (g_afb_instance == nullptr)
{
afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -253,9 +246,7 @@ void windowmanager_requestsurface(afb_req req) noexcept
void windowmanager_requestsurfacexdg(afb_req req) noexcept
{
std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
- ST();
-#endif
+
if (g_afb_instance == nullptr)
{
afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -353,9 +344,7 @@ void windowmanager_setrole(afb_req req) noexcept
void windowmanager_activatewindow(afb_req req) noexcept
{
std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
- ST();
-#endif
+
if (g_afb_instance == nullptr)
{
afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -402,9 +391,7 @@ void windowmanager_activatewindow(afb_req req) noexcept
void windowmanager_deactivatewindow(afb_req req) noexcept
{
std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
- ST();
-#endif
+
if (g_afb_instance == nullptr)
{
afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -443,9 +430,7 @@ void windowmanager_deactivatewindow(afb_req req) noexcept
void windowmanager_enddraw(afb_req req) noexcept
{
std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
- ST();
-#endif
+
if (g_afb_instance == nullptr)
{
afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -476,9 +461,7 @@ void windowmanager_enddraw(afb_req req) noexcept
void windowmanager_getdisplayinfo_thunk(afb_req req) noexcept
{
std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
- ST();
-#endif
+
if (g_afb_instance == nullptr)
{
afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -506,9 +489,7 @@ void windowmanager_getdisplayinfo_thunk(afb_req req) noexcept
void windowmanager_getareainfo_thunk(afb_req req) noexcept
{
std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
- ST();
-#endif
+
if (g_afb_instance == nullptr)
{
afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -546,9 +527,7 @@ void windowmanager_getareainfo_thunk(afb_req req) noexcept
void windowmanager_wm_subscribe(afb_req req) noexcept
{
std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
- ST();
-#endif
+
if (g_afb_instance == nullptr)
{
afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -585,9 +564,7 @@ void windowmanager_wm_subscribe(afb_req req) noexcept
void windowmanager_list_drawing_names(afb_req req) noexcept
{
std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
- ST();
-#endif
+
if (g_afb_instance == nullptr)
{
afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -617,9 +594,7 @@ void windowmanager_list_drawing_names(afb_req req) noexcept
void windowmanager_ping(afb_req req) noexcept
{
std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
- ST();
-#endif
+
if (g_afb_instance == nullptr)
{
afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -643,9 +618,7 @@ void windowmanager_ping(afb_req req) noexcept
void windowmanager_debug_status(afb_req req) noexcept
{
std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
- ST();
-#endif
+
if (g_afb_instance == nullptr)
{
afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -672,9 +645,7 @@ void windowmanager_debug_status(afb_req req) noexcept
void windowmanager_debug_layers(afb_req req) noexcept
{
std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
- ST();
-#endif
+
if (g_afb_instance == nullptr)
{
afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -697,9 +668,7 @@ void windowmanager_debug_layers(afb_req req) noexcept
void windowmanager_debug_surfaces(afb_req req) noexcept
{
std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
- ST();
-#endif
+
if (g_afb_instance == nullptr)
{
afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");
@@ -728,9 +697,7 @@ void windowmanager_debug_surfaces(afb_req req) noexcept
void windowmanager_debug_terminate(afb_req req) noexcept
{
std::lock_guard<std::mutex> guard(binding_m);
-#ifdef ST
- ST();
-#endif
+
if (g_afb_instance == nullptr)
{
afb_req_fail(req, "failed", "Binding not initialized, did the compositor die?");