devicemgr: changed comparison from non-zero to positive values 08/312408/2
authorduna.oh <duna.oh@samsung.com>
Mon, 10 Jun 2024 02:23:24 +0000 (11:23 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 10 Jun 2024 06:50:02 +0000 (06:50 +0000)
Change-Id: I43b865f4e68960a50e41c68ce7621a40dff775c5

src/bin/e_comp_wl_input.c
src/bin/e_devicemgr_input.c

index ceba325f99b894e2af8e6c4f681ee6cc64b2bbd6..9c267076f36c8398c2617241a9c51ae5734faa52 100644 (file)
@@ -817,10 +817,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;
index 7e1df099d59b34578bd55162cffbf85d0aca69b8..47f3baf22de14c24ff38f79d4eb59b025f528860 100644 (file)
@@ -77,10 +77,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;