mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
input: pointer-leave: don't reset mouse properties with memset()
Using memset() also clears the mouse bindings. This is both incorrect, and leaked memory.
This commit is contained in:
parent
49eea3893e
commit
375dcf0810
1 changed files with 6 additions and 1 deletions
7
input.c
7
input.c
|
|
@ -1211,7 +1211,12 @@ wl_pointer_leave(void *data, struct wl_pointer *wl_pointer,
|
|||
}
|
||||
|
||||
/* Reset mouse state */
|
||||
memset(&seat->mouse, 0, sizeof(seat->mouse));
|
||||
seat->mouse.x = seat->mouse.y = 0;
|
||||
seat->mouse.col = seat->mouse.row = 0;
|
||||
seat->mouse.button = seat->mouse.last_button = seat->mouse.count = 0;
|
||||
memset(&seat->mouse.last_time, 0, sizeof(seat->mouse.last_time));
|
||||
seat->mouse.axis_aggregated = 0.0;
|
||||
seat->mouse.have_discrete = false;
|
||||
|
||||
seat->mouse_focus = NULL;
|
||||
if (old_moused == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue