From: John Lindgren Date: Sat, 11 Nov 2023 04:44:41 +0000 (-0500) Subject: key-state: use struct assignment X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=c78750283f7af344628908defb86e7e0bd0924f9;p=proto%2Flabwc.git key-state: use struct assignment --- diff --git a/src/input/key-state.c b/src/input/key-state.c index c512a762..8ce66ff0 100644 --- a/src/input/key-state.c +++ b/src/input/key-state.c @@ -79,9 +79,7 @@ key_state_pressed_sent_keycodes(void) report(&bound, "before - bound:"); /* pressed_sent = pressed - bound */ - memcpy(pressed_sent.keys, pressed.keys, - MAX_PRESSED_KEYS * sizeof(uint32_t)); - pressed_sent.nr_keys = pressed.nr_keys; + pressed_sent = pressed; for (int i = 0; i < bound.nr_keys; ++i) { remove_key(&pressed_sent, bound.keys[i]); }