+void WindowBaseEcoreWl2::TizenPolicyConformantArea(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, uint32_t conformantPart, uint32_t state, int32_t x, int32_t y, int32_t w, int32_t h)
+{
+ int originalX, originalY, originalWidth, originalHeight;
+ bool changed = false;
+
+ if(!surface)
+ {
+ DALI_LOG_ERROR("Failed to get wayland surface in WindowBaseEcoreWl2::TizenPolicyConformantArea()\n");
+ return;
+ }
+
+ if(conformantPart == TIZEN_POLICY_CONFORMANT_PART_INDICATOR)
+ {
+ ecore_wl2_window_indicator_geometry_get(mEcoreWindow, &originalX, &originalY, &originalWidth, &originalHeight);
+ if((originalX != x) || (originalY != y) || (originalWidth != w) || (originalHeight != h))
+ {
+ ecore_wl2_window_indicator_geometry_set(mEcoreWindow, x, y, w, h);
+ changed = true;
+ }
+
+ /**
+ * The given state is based on the visibility value of indicator.
+ * Thus we need to add 1 to it before comparing with indicator state.
+ */
+ Ecore_Wl2_Indicator_State indState = ecore_wl2_window_indicator_state_get(mEcoreWindow);
+ if((state + 1) != indState)
+ {
+ ecore_wl2_window_indicator_state_set(mEcoreWindow, static_cast<Ecore_Wl2_Indicator_State>(state + 1));
+ changed = true;
+ }
+ }
+ else if(conformantPart == TIZEN_POLICY_CONFORMANT_PART_KEYBOARD)
+ {
+ ecore_wl2_window_keyboard_geometry_get(mEcoreWindow, &originalX, &originalY, &originalWidth, &originalHeight);
+ if((originalX != x) || (originalY != y) || (originalWidth != w) || (originalHeight != h))
+ {
+ ecore_wl2_window_keyboard_geometry_set(mEcoreWindow, x, y, w, h);
+ changed = true;
+ }
+
+ /**
+ * The given state is based on the visibility value of virtual keyboard window.
+ * Thus we need to add 1 to it before comparing with keyboard state.
+ */
+ Ecore_Wl2_Virtual_Keyboard_State kbdState = ecore_wl2_window_keyboard_state_get(mEcoreWindow);
+ if((state + 1) != (kbdState))
+ {
+ ecore_wl2_window_keyboard_state_set(mEcoreWindow, static_cast<Ecore_Wl2_Virtual_Keyboard_State>(state + 1));
+ changed = true;
+ }
+ }
+ else if(conformantPart == TIZEN_POLICY_CONFORMANT_PART_CLIPBOARD)
+ {
+ ecore_wl2_window_clipboard_geometry_get(mEcoreWindow, &originalX, &originalY, &originalWidth, &originalHeight);
+ if((originalX != x) || (originalY != y) || (originalWidth != w) || (originalHeight != h))
+ {
+ ecore_wl2_window_clipboard_geometry_set(mEcoreWindow, x, y, w, h);
+ changed = true;
+ }
+
+ /**
+ * The given state is based on the visibility value of clipboard window.
+ * Thus we need to add 1 to it before comparing with clipboard state.
+ */
+ Ecore_Wl2_Clipboard_State clipState = ecore_wl2_window_clipboard_state_get(mEcoreWindow);
+ if((state + 1) != clipState)
+ {
+ ecore_wl2_window_clipboard_state_set(mEcoreWindow, static_cast<Ecore_Wl2_Clipboard_State>(state + 1));
+ changed = true;
+ }
+ }
+
+ if(changed)
+ {
+ Ecore_Wl2_Event_Conformant_Change *ev = static_cast<Ecore_Wl2_Event_Conformant_Change*>(calloc(1, sizeof(Ecore_Wl2_Event_Conformant_Change)));
+
+ if(!ev)
+ {
+ return;
+ }
+ ev->win = GetNativeWindowId();
+ ev->part_type = static_cast<Ecore_Wl2_Conformant_Part_Type>(conformantPart);
+ ev->state = state;
+ ecore_event_add(ECORE_WL2_EVENT_CONFORMANT_CHANGE, ev, NULL, NULL);
+ }
+
+ DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::TizenPolicyConformantArea: conformantPart = %u, state = %u, position = (%d, %d), size = (%d, %d)\n", conformantPart, state, x, y, w, h);
+}
+