ecore-wayland: Input grab_count is unsigned int, no need for comparison < 0

Summary: As input->grab_count is an unsigned int there is no need for
the < 0 comparison as that will always return false

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-05-12 09:14:26 -04:00
parent aee186b4f3
commit d278cd5f49
1 changed files with 4 additions and 6 deletions

View File

@ -601,9 +601,8 @@ _ecore_wl_input_cb_pointer_button(void *data, struct wl_pointer *pointer EINA_UN
0, button, timestamp);
input->grab_count--;
if (input->grab_count < 0)
input->grab_count = 0;
if ((input->grab) && (input->grab_button == button) && (!state) && (!input->grab_count))
if ((input->grab) && (input->grab_button == button) &&
(!state) && (!input->grab_count))
ecore_wl_input_ungrab(input);
}
@ -1110,9 +1109,8 @@ _ecore_wl_input_cb_touch_up(void *data, struct wl_touch *touch EINA_UNUSED, unsi
_ecore_wl_input_mouse_up_send(input, input->touch_focus, id, BTN_LEFT, timestamp);
input->grab_count--;
if (input->grab_count < 0)
input->grab_count = 0;
if ((input->grab) && (input->grab_button == BTN_LEFT) && (!input->grab_count))
if ((input->grab) && (input->grab_button == BTN_LEFT) &&
(!input->grab_count))
ecore_wl_input_ungrab(input);
}