From: Kristian Høgsberg Date: Tue, 30 Oct 2012 19:50:37 +0000 (-0400) Subject: image: Set dragging pointer on button press, not first motion X-Git-Tag: 1.0.1~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9468708f70ee28f8819741d3354a5db9efee4231;p=platform%2Fupstream%2Fweston.git image: Set dragging pointer on button press, not first motion We want feedback that we're starting to drag when we press the button not when we later start dragging the image. --- diff --git a/clients/image.c b/clients/image.c index 1c240a5..6a2bda3 100644 --- a/clients/image.c +++ b/clients/image.c @@ -240,14 +240,14 @@ button_handler(struct widget *widget, void *data) { struct image *image = data; - bool was_pressed; if (button == BTN_LEFT) { - was_pressed = image->button_pressed; image->button_pressed = state == WL_POINTER_BUTTON_STATE_PRESSED; - if (!image->button_pressed && was_pressed) + if (state == WL_POINTER_BUTTON_STATE_PRESSED) + input_set_pointer_image(input, CURSOR_DRAGGING); + else input_set_pointer_image(input, CURSOR_LEFT_PTR); } }