e_zone: create e_focus at only default zone. 57/297557/1
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 17 Aug 2023 02:19:41 +0000 (11:19 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Mon, 21 Aug 2023 07:58:39 +0000 (16:58 +0900)
Create E_Focus at only default zone which the zone num is 0

Change-Id: I25200e6867c7d8d7dce55bf00bc0783c04c5acf5

src/bin/e_comp.c
src/bin/e_zone.c

index 1126617d9798dd28c2834f87d9ace3c309f9b7e4..0f7864cc9d6cf845abaf3ddf42641e145c7a6b16 100644 (file)
@@ -1476,7 +1476,7 @@ e_comp_idler_before(void)
                 {
                   // FIXME: Only the default zone(screen) update the focus.
                   //        Multi-zones(Multi-screens) are not supported yet.
-                  if (zone->id > 0) continue;
+                  if (!zone->focus) continue;
 
                    e_focus_update(zone->focus);
                 }
index 5fdf9f114209cc47b0acfb74be0a5ce83db32973..6ba1183f87015c215a81c02cb8febf716c3cc41e 100644 (file)
@@ -135,24 +135,22 @@ e_zone_new(int num, int id, int x, int y, int w, int h)
    zone->display_state = E_ZONE_DISPLAY_STATE_ON;
 
 #ifdef REFACTOR_FOCUS_POLICY
-   if (e_config->focus_policy_ext == E_FOCUS_EXT_TOP_STACK)
-      {
-         zone->focus = e_focus_new(zone, E_FOCUS_EXT_TOP_STACK);
-      }
-   else if (e_config->focus_policy_ext == E_FOCUS_EXT_HISTORY)
-      {
-         zone->focus = e_focus_new(zone, E_FOCUS_EXT_HISTORY);
-      }
-   else
-      {
-         // default focus policy is E_FOCUS_EXT_TOP_STACK
-         zone->focus = e_focus_new(zone, E_FOCUS_EXT_TOP_STACK);
-      }
-   if (!zone->focus)
+   // Create E_Focus at only default zone which the zone num is 0
+   if (zone->num == 0)
      {
-         e_object_del(E_OBJECT(zone));
-         ERR("Fail to create focus object at zone %d", zone->num);
-         return NULL;
+        if (e_config->focus_policy_ext == E_FOCUS_EXT_TOP_STACK)
+          zone->focus = e_focus_new(zone, E_FOCUS_EXT_TOP_STACK);
+        else if (e_config->focus_policy_ext == E_FOCUS_EXT_HISTORY)
+          zone->focus = e_focus_new(zone, E_FOCUS_EXT_HISTORY);
+        else
+          // default focus policy is E_FOCUS_EXT_TOP_STACK
+          zone->focus = e_focus_new(zone, E_FOCUS_EXT_TOP_STACK);
+        if (!zone->focus)
+          {
+             e_object_del(E_OBJECT(zone));
+             ERR("Fail to create focus object at zone %d", zone->num);
+             return NULL;
+          }
      }
 #endif