tizen_policy: check the client's version of TIZEN_POLICY_CONFORMANT_REGION event
[platform/core/uifw/libds-tizen.git] / src / policy / policy.c
index c2acb39..95b9e02 100644 (file)
@@ -638,9 +638,17 @@ ds_tizen_policy_surface_send_conformant_area(struct ds_tizen_policy_surface *pol
             return;
     }
 
-    tizen_policy_send_conformant_area(policy_surface->client->resource,
-        ds_surface_get_wl_resource(policy_surface->surface), conformant_part, visible,
-        x, y, w, h);
+    if (wl_resource_get_version(policy_surface->client->resource) >=
+        TIZEN_POLICY_CONFORMANT_REGION_SINCE_VERSION) {
+        tizen_policy_send_conformant_area(policy_surface->client->resource,
+            ds_surface_get_wl_resource(policy_surface->surface), conformant_part, visible,
+            x, y, w, h);
+    } else {
+        ds_err("client does not support TIZEN_POLICY_CONFORMANT_REGION."
+            "client version(%d) < server version(%d)",
+            wl_resource_get_version(policy_surface->client->resource),
+            TIZEN_POLICY_CONFORMANT_REGION_SINCE_VERSION);
+    }
 }
 
 WL_EXPORT void