aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-11-29 21:13:19 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-11-29 21:13:19 +0000
commit2c12549f931afe5f8f10bcbab4cd4b4407b31428 (patch)
tree8bdea57179ace595921c5ed263e314d617c00c50 /input.c
parentinput: pointer-enter: add debug log (diff)
input: pointer-leave: reset moused *before* doing anything else
And update xcursor. This is currently not necessary, but doesn't hurt.
Diffstat (limited to 'input.c')
-rw-r--r--input.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/input.c b/input.c
index 0816e0ad..14f2d722 100644
--- a/input.c
+++ b/input.c
@@ -459,12 +459,17 @@ wl_pointer_leave(void *data, struct wl_pointer *wl_pointer,
uint32_t serial, struct wl_surface *surface)
{
struct wayland *wayl = data;
- if (wayl->moused == NULL) {
+ struct terminal *old_moused = wayl->moused;
+
+ LOG_DBG("pointer-leave: surface = %p, old-moused = %p", surface, old_moused);
+
+ wayl->moused = NULL;
+ if (old_moused == NULL) {
LOG_WARN(
"compositor sent pointer_leave event without a pointer_enter "
"event: surface=%p", surface);
- }
- wayl->moused = NULL;
+ } else
+ term_xcursor_update(old_moused);
}
static void