summaryrefslogtreecommitdiff
path: root/clients/transformed.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-11-30 14:54:35 -0500
committerKristian Høgsberg <krh@bitplanet.net>2012-11-30 14:54:35 -0500
commitbf74d5242ab457019cf7ba70f845e9d253a811bf (patch)
treead55fd3737fd2751edc2e05a10a7686e60dc8998 /clients/transformed.c
parentec07669a082d7c3156692a24fdbd4824e7cb9d7d (diff)
downloadweston-bf74d5242ab457019cf7ba70f845e9d253a811bf.tar.gz
weston-bf74d5242ab457019cf7ba70f845e9d253a811bf.tar.bz2
weston-bf74d5242ab457019cf7ba70f845e9d253a811bf.zip
window: Add a widget default cursor convenience helper
In a few cases, we set a motion handler just to be able to set a fixed cursor. This adds a default cursor helper that can be used in those cases. In case of the 'transformed' test case, we also avoid a brief flicker of the pointer cursor, which is set on enter when the move grab is lifted.
Diffstat (limited to 'clients/transformed.c')
-rw-r--r--clients/transformed.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/clients/transformed.c b/clients/transformed.c
index be840d93..af77e18f 100644
--- a/clients/transformed.c
+++ b/clients/transformed.c
@@ -185,13 +185,6 @@ output_handler(struct window *window, struct output *output, int enter,
window_schedule_redraw(window);
}
-static int
-motion_handler(struct widget *widget, struct input *input,
- uint32_t time, float x, float y, void *data)
-{
- return CURSOR_BLANK;
-}
-
static void
button_handler(struct widget *widget,
struct input *input, uint32_t time,
@@ -237,9 +230,9 @@ int main(int argc, char *argv[])
window_set_title(transformed.window, "Transformed");
widget_set_transparent(transformed.widget, 0);
+ widget_set_default_cursor(transformed.widget, CURSOR_BLANK);
widget_set_redraw_handler(transformed.widget, redraw_handler);
- widget_set_motion_handler(transformed.widget, motion_handler);
widget_set_button_handler(transformed.widget, button_handler);
window_set_fullscreen_handler(transformed.window, fullscreen_handler);