e_seat: reduce duplicated code 61/322661/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Sat, 12 Apr 2025 02:21:50 +0000 (11:21 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Mon, 14 Apr 2025 06:42:40 +0000 (15:42 +0900)
Change-Id: Ia71bb81c60f752857d8ae7281c73f990b48dea83
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/bin/server/e_seat.c

index 4ef729cfe431ee59c66c663978f8c09ad9570a6f..f3aad4bdf7ffbe9cd1192468a26d179a1d52e4b7 100644 (file)
@@ -706,16 +706,12 @@ e_seat_touch_send_downup(E_Seat *seat, struct wl_client *wc,
         if (!e_seat_touch_check(res)) continue;
 
         TRACE_INPUT_BEGIN(e_seat_touch_send_downup);
+        ELOGF("Touch", "%s (id: %d, time: %d, x:%d, y:%d)", NULL, pressed ? "Down" : "Up", idx, timestamp, x, y);
         if (pressed)
-          {
-             ELOGF("Touch", "Down (id: %d, time: %d, x:%d, y:%d)", NULL, idx, timestamp, x, y);
-             wl_touch_send_down(res, serial, timestamp, surface, idx, wl_fixed_from_int(x), wl_fixed_from_int(y));
-          }
+          wl_touch_send_down(res, serial, timestamp, surface, idx, wl_fixed_from_int(x), wl_fixed_from_int(y));
         else
-          {
-             ELOGF("Touch", "Up (id: %d, time: %d, x:%d, y:%d)", NULL, idx, timestamp, x, y);
-             wl_touch_send_up(res, serial, timestamp, idx);
-          }
+          wl_touch_send_up(res, serial, timestamp, idx);
+
         TRACE_INPUT_END();
      }
    return;