e_policy_wl: add a new aux hint for resizing window by ppu 75/286575/2
authorDoyoun Kang <doyoun.kang@samsung.com>
Tue, 10 Jan 2023 04:50:35 +0000 (13:50 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Tue, 10 Jan 2023 05:24:20 +0000 (05:24 +0000)
We add a new aux hint value for ppu.
- wm.policy.win.resize.ppu

Change-Id: I563f4621978bcb37d8ce8410b6e0e615350e6c21

src/bin/e_policy_wl.c

index 615699a..caa3c10 100644 (file)
@@ -279,6 +279,7 @@ enum _E_Policy_Hint_Type
    E_POLICY_HINT_RESIZE_HEADER_HEIGHT = 15,
    E_POLICY_HINT_RESIZE_FOOTER_HEIGHT = 16,
    E_POLICY_HINT_VISIBILITY_IGNORE_GEOMETRY= 17,
+   E_POLICY_HINT_RESIZE_PPU = 18,
 };
 
 static const char *hint_names[] =
@@ -301,6 +302,7 @@ static const char *hint_names[] =
    "wm.policy.win.resize.header_height",
    "wm.policy.win.resize.footer_height",
    "wm.policy.win.visibility.ignore_geometry",
+   "wm.policy.win.resize.ppu",
 };
 
 static void                _e_policy_wl_surf_del(E_Policy_Wl_Surface *psurf);
@@ -2597,6 +2599,14 @@ _e_policy_wl_aux_hint_apply(E_Client *ec)
                   ec->visibility.ignore_geometry = EINA_FALSE;
                }
           }
+        else if (!strncmp(hint->hint, hint_names[E_POLICY_HINT_RESIZE_PPU], strlen(hint->hint)))
+          {
+             int ppu = atoi(hint->val);
+             if (ppu < 1) ppu = 1;
+
+             ELOGF("RESIZE", "Set resize unit. size:%d", ec, ppu);
+             e_client_resize_unit_size_set(ec, ppu);
+          }
      }
 
    e_policy_hook_call(E_POLICY_HOOK_CLIENT_AUX_HINT_CHANGED, ec);