From 11f600d82ec065c0ff25c24865adfad3bc1544df Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 22 Jun 2012 10:52:58 -0400 Subject: [PATCH] window.c: Always set cursor after pointer enter If the cursor didn't change since last time we had pointer focus we just wouldn't change it. But whoever had pointer focus in the mean time could have changed it, so make sure we always set the cursor after pointer enter. --- clients/window.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clients/window.c b/clients/window.c index f41812a..9d384b7 100644 --- a/clients/window.c +++ b/clients/window.c @@ -194,6 +194,7 @@ struct input { struct wl_surface *pointer_surface; uint32_t modifiers; uint32_t pointer_enter_serial; + uint32_t cursor_serial; float sx, sy; struct wl_list link; @@ -2439,10 +2440,12 @@ static const struct wl_callback_listener pointer_surface_listener = { void input_set_pointer_image(struct input *input, int pointer) { - if (pointer == input->current_cursor) + if (pointer == input->current_cursor && + input->pointer_enter_serial == input->cursor_serial) return; input->current_cursor = pointer; + input->cursor_serial = input->pointer_enter_serial; if (!input->cursor_frame_cb) pointer_surface_frame_callback(input, NULL, 0); } -- 2.7.4