devicemgr: changed comparison from non-zero to positive values 12/312412/1
authorduna.oh <duna.oh@samsung.com>
Mon, 10 Jun 2024 02:23:24 +0000 (11:23 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Mon, 10 Jun 2024 02:52:10 +0000 (11:52 +0900)
Change-Id: I1f160a1cc9efe3ca6c22a9fe5eebe172691b4722

src/bin/inputmgr/e_devicemgr_input.c
src/bin/server/e_comp_wl_input.c

index 5a8de83..05f066e 100644 (file)
@@ -88,10 +88,10 @@ e_devicemgr_input_pointer_warp(struct wl_client *client, struct wl_resource *res
    new_y = wl_fixed_to_int(y);
 
    if (new_x < 0) new_x = 0;
-   if ((ec->w != 0) && (new_x > ec->w - 1)) new_x = ec->w - 1;
+   if ((ec->w > 0) && (new_x > ec->w - 1)) new_x = ec->w - 1;
 
    if (new_y < 0) new_y = 0;
-   if ((ec->h != 0) && (new_y > ec->h - 1)) new_y = ec->h - 1;
+   if ((ec->h > 0) && (new_y > ec->h - 1)) new_y = ec->h - 1;
 
    new_x = ec->client.x + new_x;
    new_y = ec->client.y + new_y;
index 497e2f8..62faf77 100644 (file)
@@ -859,10 +859,10 @@ _e_comp_wl_input_cb_pointer_constraints_surface_committed(struct wl_listener *li
         new_y = wl_fixed_to_int(constraint->hint_y_pending);
 
         if (new_x < 0) new_x = 0;
-        if ((ec->w != 0) && (new_x > ec->w - 1)) new_x = ec->w - 1;
+        if ((ec->w > 0) && (new_x > ec->w - 1)) new_x = ec->w - 1;
 
         if (new_y < 0) new_y = 0;
-        if ((ec->h != 0) && (new_y > ec->h - 1)) new_y = ec->h - 1;
+        if ((ec->h > 0) && (new_y > ec->h - 1)) new_y = ec->h - 1;
 
         new_x = ec->client.x + new_x;
         new_y = ec->client.y + new_y;