Ticket #3760: Fix aborts of MSG_MOUSE_DOWN.

This patch was supposed to get committed as part of #3571 but this never
happened. We commit it now as we depend on its functionality for the next
commit.

Signed-off-by: Mooffie <mooffie@gmail.com>
This commit is contained in:
Mooffie 2017-01-25 18:36:16 +02:00
parent 20a2b6081c
commit 5ea5c5deb6

View File

@ -181,6 +181,11 @@ mouse_process_event (Widget * w, mouse_event_t * event)
{
w->mouse_callback (w, event->msg, event);
/* If a widget aborts a MSG_MOUSE_DOWN, we uncapture it so it
* doesn't steal events from other widgets. */
if (event->msg == MSG_MOUSE_DOWN && event->result.abort)
w->mouse.capture = FALSE;
/* Upon releasing the mouse button: if the mouse hasn't been dragged
* since the MSG_MOUSE_DOWN, we also trigger a click. */
if (event->msg == MSG_MOUSE_UP && w->mouse.last_msg == MSG_MOUSE_DOWN)