window: Always pass focused widget to widget motion handlers
authorJonas Ådahl <jadahl@gmail.com>
Fri, 19 Oct 2012 17:56:02 +0000 (19:56 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 19 Oct 2012 20:56:08 +0000 (16:56 -0400)
Grabbed widgets should always receive motion events as if it was the
widget that would receive it if no grab was active. This means that the
focused widget should always be passed as the widget argument to widget
motion handlers.

This reverts commit 8c9c8fcf6e294f0446446d8e9bdfeb37294743c3.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
clients/window.c

index 36901d5..380962c 100644 (file)
@@ -2095,7 +2095,7 @@ pointer_handle_motion(void *data, struct wl_pointer *pointer,
        else
                widget = input->focus_widget;
        if (widget && widget->motion_handler)
-               cursor = widget->motion_handler(widget,
+               cursor = widget->motion_handler(input->focus_widget,
                                                input, time, sx, sy,
                                                widget->user_data);