Bug Fix : set source rectangle x, y is not 0
[apps/agl-service-windowmanager.git] / src / main.cpp
index be8db1d..c1bc910 100644 (file)
@@ -359,7 +359,12 @@ void windowmanager_setrole(afb_req req) noexcept
             pid = std::stol(a_pid);
         }
 
-        g_afb_instance->app.api_set_role(appid.c_str(), a_role, pid);
+        bool ret = g_afb_instance->app.api_set_role(appid.c_str(), a_role, pid);
+        if (!ret)
+        {
+            afb_req_fail(req, "failed", "Couldn't register");
+            return;
+        }
 
         if (isFirstReq)
         {