e_policy_zone: Create focus policy object for non-default zones 08/320608/1
authorJunseok Kim <juns.kim@samsung.com>
Tue, 21 Jan 2025 06:08:47 +0000 (15:08 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 5 Mar 2025 05:00:11 +0000 (14:00 +0900)
Create and assign topmost focus policy for non-primary zones temporary for implementation of multi-screen.
please modify it after E20 supports multi focus policy.

Change-Id: Ia16ad5326f3f39ad55a81f62694cea5be66521f2

src/bin/compmgr/e_comp.c
src/bin/windowmgr/e_policy_zone.c

index 80d6c4d6994aca4d4bdfb8defa82d59921198df1..9db6fa6c99af86fda08b5442f1b42beb93a85af1 100644 (file)
@@ -1487,16 +1487,16 @@ e_comp_idler_before(void)
      {
         EINA_LIST_FOREACH(e_comp->zones, zl, zone)
            {
+              e_visibility_changed = EINA_FALSE;
+
               if (e_comp_visibility_calculation_get())
                 e_visibility_changed = e_policy_zone_visibility_calculate(zone);
 
-              if (check_focus ||
-                  (e_client_focused_get() == NULL) ||
-                  (e_visibility_changed))
+              if (zone->focus &&
+                  (check_focus ||
+                  (e_zone_focused_client_get(zone) == NULL) ||
+                  e_visibility_changed))
                 {
-                  // FIXME: Only the default zone(screen) update the focus.
-                  //        Multi-zones(Multi-screens) are not supported yet.
-                  if (!zone->focus) continue;
 
                    e_focus_update(zone->focus);
                 }
index 53e709c8e2a39ed6b5e29dc39b4183c83c77ba13..23f77489b2ea58979218ac5901b26e4b37e09d12 100644 (file)
@@ -1963,6 +1963,19 @@ e_policy_zone_new(E_Zone *zone)
              return NULL;
           }
      }
+   else
+     {
+        // FIXME: the zone except primary zone takes topmost focus policy for temporary.
+        //        please remove it and above after when supports multi focus policy.
+        zone->focus = e_focus_new(policy_zone, E_FOCUS_EXT_TOP_STACK);
+        if (!zone->focus)
+          {
+             e_object_unref(E_OBJECT(zone));
+             ERR("Fail to create focus object at zone %d", zone->num);
+             E_FREE(policy_zone);
+             return NULL;
+          }
+     }
 
    // CLIENT HOOK Handlers
    E_LIST_HOOK_APPEND(zone->ec_hooks, E_CLIENT_HOOK_NEW_CLIENT_POST, _e_policy_zone_cb_hook_client_new_client_post, zone);