e_comp_wl: Merge related but distant implementations together 55/318255/1
authorSeunghun Lee <shiin.lee@samsung.com>
Mon, 13 Jan 2025 09:26:52 +0000 (18:26 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 15 Jan 2025 00:34:48 +0000 (09:34 +0900)
No functional change

Change-Id: I9f5066472b3b42fcc84a5a143694907a182c7b93

src/bin/server/e_comp_wl.c

index be9501d87ff875f5374b8c7d8459e09c8592695a..1604ea355a7a27ae123d272d3018f2c93d260242 100644 (file)
@@ -2941,7 +2941,6 @@ static void
 _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
 {
    Eina_Bool placed = EINA_TRUE;
-   int x = 0, y = 0;
    int w, h;
    int nw, nh;
    E_Comp_Wl_Buffer *buffer;
@@ -2966,19 +2965,6 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
         _e_comp_wl_surface_state_size_update(ec, state);
         e_comp_wl_map_size_cal_from_viewport(ec);
 
-        /* update the position */
-        if (ec->changes.pos)
-          {
-             e_view_client_frame_xy_unadjust(e_client_view_get(ec),
-                                             ec->x, ec->y,
-                                             &x, &y);
-          }
-        else
-          {
-             x = ec->client.x;
-             y = ec->client.y;
-          }
-
         if (ec->new_client) placed = ec->placed;
 
         if (!ec->lock_client_size)
@@ -3060,6 +3046,21 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
           }
         else if (!e_client_video_hw_composition_check(ec))
           {
+             int x = 0, y = 0;
+
+             /* update the position */
+             if (ec->changes.pos)
+               {
+                  e_view_client_frame_xy_unadjust(e_client_view_get(ec),
+                                                  ec->x, ec->y,
+                                                  &x, &y);
+               }
+             else
+               {
+                  x = ec->client.x;
+                  y = ec->client.y;
+               }
+
              e_client_util_move_resize_without_frame(ec, x, y, ec->w, ec->h);
           }