e_comp_wl: Extract function from large function 63/318263/1
authorSeunghun Lee <shiin.lee@samsung.com>
Tue, 14 Jan 2025 01:17:41 +0000 (10:17 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 15 Jan 2025 00:34:48 +0000 (09:34 +0900)
No functional change

Change-Id: Icb8debdf72e2544743156dafad9011c5ed9c68b9

src/bin/server/e_comp_wl.c

index 8256d41436d0e885b672ae0aa7bb590facacc4fb..fbb0d8cf57ce39fa0626ad9929b5504d5626dcc9 100644 (file)
@@ -2992,6 +2992,27 @@ _e_comp_wl_client_map_update(E_Client *ec)
      }
 }
 
+static void
+_e_comp_wl_client_position_update(E_Client *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);
+}
+
 static void
 _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
 {
@@ -3049,22 +3070,7 @@ _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);
+             _e_comp_wl_client_position_update(ec);
           }
 
         if (ec->new_client)