tizen_policy: check the client's version of TIZEN_POLICY_CONFORMANT_REGION event 81/280981/1
authorSooChan Lim <sc1.lim@samsung.com>
Wed, 7 Sep 2022 06:59:23 +0000 (15:59 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 7 Sep 2022 08:11:56 +0000 (17:11 +0900)
Change-Id: Iaa6cd9fcc7e99933f8ff6f4a4ed9eee039d564d9

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