From: duna.oh Date: Mon, 10 Jun 2024 02:23:24 +0000 (+0900) Subject: devicemgr: changed comparison from non-zero to positive values X-Git-Tag: accepted/tizen/8.0/unified/20240610.163446~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F08%2F312408%2F2;p=platform%2Fupstream%2Fenlightenment.git devicemgr: changed comparison from non-zero to positive values Change-Id: I43b865f4e68960a50e41c68ce7621a40dff775c5 --- diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index ceba325f99..9c267076f3 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -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; diff --git a/src/bin/e_devicemgr_input.c b/src/bin/e_devicemgr_input.c index 7e1df099d5..47f3baf22d 100644 --- a/src/bin/e_devicemgr_input.c +++ b/src/bin/e_devicemgr_input.c @@ -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;