summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wayland
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-05-12 09:14:26 -0400
committerChris Michael <cp.michael@samsung.com>2015-05-12 09:14:26 -0400
commitd278cd5f49c4677e53d2e224486c4c182a731d95 (patch)
tree2c079fa27b70819c1d7431abb926fb12ae7c9639 /src/lib/ecore_wayland
parentaee186b4f3fdc27b5fe6ac13238e517f4f02fe15 (diff)
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>
Diffstat (limited to 'src/lib/ecore_wayland')
-rwxr-xr-xsrc/lib/ecore_wayland/ecore_wl_input.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c
index 294121f..61c32b4 100755
--- a/src/lib/ecore_wayland/ecore_wl_input.c
+++ b/src/lib/ecore_wayland/ecore_wl_input.c
@@ -601,9 +601,8 @@ _ecore_wl_input_cb_pointer_button(void *data, struct wl_pointer *pointer EINA_UN
601 0, button, timestamp); 601 0, button, timestamp);
602 602
603 input->grab_count--; 603 input->grab_count--;
604 if (input->grab_count < 0) 604 if ((input->grab) && (input->grab_button == button) &&
605 input->grab_count = 0; 605 (!state) && (!input->grab_count))
606 if ((input->grab) && (input->grab_button == button) && (!state) && (!input->grab_count))
607 ecore_wl_input_ungrab(input); 606 ecore_wl_input_ungrab(input);
608 } 607 }
609 608
@@ -1110,9 +1109,8 @@ _ecore_wl_input_cb_touch_up(void *data, struct wl_touch *touch EINA_UNUSED, unsi
1110 1109
1111 _ecore_wl_input_mouse_up_send(input, input->touch_focus, id, BTN_LEFT, timestamp); 1110 _ecore_wl_input_mouse_up_send(input, input->touch_focus, id, BTN_LEFT, timestamp);
1112 input->grab_count--; 1111 input->grab_count--;
1113 if (input->grab_count < 0) 1112 if ((input->grab) && (input->grab_button == BTN_LEFT) &&
1114 input->grab_count = 0; 1113 (!input->grab_count))
1115 if ((input->grab) && (input->grab_button == BTN_LEFT) && (!input->grab_count))
1116 ecore_wl_input_ungrab(input); 1114 ecore_wl_input_ungrab(input);
1117} 1115}
1118 1116