Fix requestSurfaceXDG
[apps/agl-service-windowmanager-2017.git] / src / wm_layer_control.cpp
index 0028fca..cf82a6b 100644 (file)
@@ -258,6 +258,21 @@ WMError LayerControl::renderLayers()
     return rc;
 }
 
+WMError LayerControl::setXDGSurfaceOriginSize(unsigned surface)
+{
+    WMError ret = WMError::NOT_REGISTERED;
+    ilmSurfaceProperties prop;
+    ilmErrorTypes rc = ilm_getPropertiesOfSurface(surface, &prop);
+    if(rc == ILM_SUCCESS)
+    {
+        HMI_INFO("xdg surface info %d, %d", prop.origSourceWidth, prop.origSourceHeight);
+        ilm_surfaceSetSourceRectangle(surface, 0, 0, prop.origSourceWidth, prop.origSourceHeight);
+        ret = WMError::SUCCESS;
+    }
+    return ret;
+}
+
+
 void LayerControl::undoUpdate()
 {
     for(auto& l : this->wm_layers)