Signed-off-by: Peter Hutterer <[email protected]>
---
 test/litest.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/test/litest.c b/test/litest.c
index e235bc9..ba3a308 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -1317,9 +1317,9 @@ litest_auto_assign_value(struct litest_device *d,
 }
 
 static void
-send_btntool(struct litest_device *d)
+send_btntool(struct litest_device *d, bool hover)
 {
-       litest_event(d, EV_KEY, BTN_TOUCH, d->ntouches_down != 0);
+       litest_event(d, EV_KEY, BTN_TOUCH, d->ntouches_down != 0 && !hover);
        litest_event(d, EV_KEY, BTN_TOOL_FINGER, d->ntouches_down == 1);
        litest_event(d, EV_KEY, BTN_TOOL_DOUBLETAP, d->ntouches_down == 2);
        litest_event(d, EV_KEY, BTN_TOOL_TRIPLETAP, d->ntouches_down == 3);
@@ -1340,7 +1340,7 @@ litest_slot_start(struct litest_device *d,
        assert(d->ntouches_down >= 0);
        d->ntouches_down++;
 
-       send_btntool(d);
+       send_btntool(d, !touching);
 
        if (d->interface->touch_down) {
                d->interface->touch_down(d, slot, x, y);
@@ -1395,7 +1395,7 @@ litest_touch_up(struct litest_device *d, unsigned int 
slot)
        litest_assert_int_gt(d->ntouches_down, 0);
        d->ntouches_down--;
 
-       send_btntool(d);
+       send_btntool(d, false);
 
        if (d->interface->touch_up) {
                d->interface->touch_up(d, slot);
@@ -1559,7 +1559,7 @@ litest_hover_end(struct litest_device *d, unsigned int 
slot)
        litest_assert_int_gt(d->ntouches_down, 0);
        d->ntouches_down--;
 
-       send_btntool(d);
+       send_btntool(d, true);
 
        if (d->interface->touch_up) {
                d->interface->touch_up(d, slot);
-- 
2.5.0

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to