resize: fix bug for aspect_ratio resize 31/276631/1 accepted/tizen/unified/20220623.144214 submit/tizen/20220622.080639
authorDoyoun Kang <doyoun.kang@samsung.com>
Wed, 22 Jun 2022 07:00:20 +0000 (16:00 +0900)
committerJunseok Kim <juns.kim@samsung.com>
Wed, 22 Jun 2022 07:45:47 +0000 (16:45 +0900)
There was a bug that the aspect_ratio didn't work correctly when the aspect_ratio
was set while creating partial window.
So we change code to set the aspect in e_client_resize_begin().

Change-Id: I8394185c324d0f518ec06950e2b585a9ac20e90b

src/bin/e_client.c
src/bin/e_policy_wl.c

index 65f58f220d5b92a02fe9db85cdfd59762fb86bff..900dcfeb948ee3c7629414c9f86530ee666c4485 100644 (file)
@@ -6865,6 +6865,12 @@ e_client_resize_begin(E_Client *ec)
      goto error;
    if (!_e_client_action_input_win_new()) goto error;
    ecresize = ec;
+   if (ec->manage_resize.enable_aspect_ratio)
+     {
+        ELOGF("RESIZE", "Set resize aspect ratio.. ratio(%dx%d)", ec, ec->w, ec->h);
+        ec->manage_resize.aw = ec->w;
+        ec->manage_resize.ah = ec->h;
+     }
    _e_client_hook_call(E_CLIENT_HOOK_RESIZE_BEGIN, ec);
    if (ec->transformed)
      _e_client_transform_resize_begin(ec);
index e1f6b88bdad07ad60c42aa6ff737f8e9f94fd1b7..236a739d3bb759432f15942f391491221fcd81dd 100644 (file)
@@ -2521,7 +2521,7 @@ _e_policy_wl_aux_hint_apply(E_Client *ec)
           {
              if (!strncmp(hint->val, "1", 1))
                {
-                  ELOGF("RESIZE", "Set resize aspect ratio", ec);
+                  ELOGF("RESIZE", "Set resize aspect ratio.. ratio(%dx%d)", ec, ec->w, ec->h);
                   ec->manage_resize.enable_aspect_ratio = EINA_TRUE;
                   ec->manage_resize.aw = ec->w;
                   ec->manage_resize.ah = ec->h;