Enable to get area size from area name
[apps/agl-service-windowmanager.git] / src / app.cpp
index 2482d37..2d82e95 100644 (file)
@@ -314,6 +314,8 @@ int App::init_layers()
 
     this->layout_commit();
 
+    this->layers.setupArea(o->width, o->height);
+
     return 0;
 }
 
@@ -1255,10 +1257,10 @@ void App::emit_syncdraw(char const *label, char const *area, int x, int y, int w
 
 void App::emit_syncdraw(const std::string &role, const std::string &area)
 {
-    int x = 0, y = 0, w = 0, h = 0;
+    compositor::rect rect = this->layers.getAreaSize(area);
     //this->lm_get_area_info(area, &x, &y, &w, &h);
     this->send_event(kListEventName[Event_SyncDraw],
-        role.c_str(), area.c_str(), x, y, w, h);
+        role.c_str(), area.c_str(), rect.x, rect.y, rect.w, rect.h);
 }
 
 void App::emit_flushdraw(char const *label)