diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-10-30 15:50:37 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-10-30 15:50:37 -0400 |
commit | 9468708f70ee28f8819741d3354a5db9efee4231 (patch) | |
tree | 939192ede9e157231ee31d1b9298717377be0e80 | |
parent | d3bf6766abeb0650990463f69fd7118c0bf1d188 (diff) | |
download | weston-9468708f70ee28f8819741d3354a5db9efee4231.tar.gz |
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.
-rw-r--r-- | clients/image.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clients/image.c b/clients/image.c index 1c240a58..6a2bda31 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); } } |