mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
input: pointer-leave: reset moused *before* doing anything else
And update xcursor. This is currently not necessary, but doesn't hurt.
This commit is contained in:
parent
6947928a7f
commit
2c12549f93
1 changed files with 8 additions and 3 deletions
11
input.c
11
input.c
|
|
@ -459,12 +459,17 @@ wl_pointer_leave(void *data, struct wl_pointer *wl_pointer,
|
||||||
uint32_t serial, struct wl_surface *surface)
|
uint32_t serial, struct wl_surface *surface)
|
||||||
{
|
{
|
||||||
struct wayland *wayl = data;
|
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(
|
LOG_WARN(
|
||||||
"compositor sent pointer_leave event without a pointer_enter "
|
"compositor sent pointer_leave event without a pointer_enter "
|
||||||
"event: surface=%p", surface);
|
"event: surface=%p", surface);
|
||||||
}
|
} else
|
||||||
wayl->moused = NULL;
|
term_xcursor_update(old_moused);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue