diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-08-10 16:59:03 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-08-13 16:47:19 +0000 |
| commit | 375dcf0810d8fdeff4a7272b22375632bd96ae4b (patch) | |
| tree | 63042f63c1b5a1d4c31f2e8c0e0b50b764c4edf0 /input.c | |
| parent | wayland: global-remove: return after finding a matching seat (diff) | |
input: pointer-leave: don't reset mouse properties with memset()
Using memset() also clears the mouse bindings. This is both incorrect,
and leaked memory.
Diffstat (limited to 'input.c')
| -rw-r--r-- | input.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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) { |
