]> git.mdlowis.com Git - proto/labwc.git/commitdiff
key-state: use struct assignment
authorJohn Lindgren <john@jlindgren.net>
Sat, 11 Nov 2023 04:44:41 +0000 (23:44 -0500)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Mon, 4 Mar 2024 01:27:40 +0000 (02:27 +0100)
src/input/key-state.c

index c512a76251b7376b48f374c0a00dc13bb91e7912..8ce66ff0da5424ceacc47571c294462a40e562a8 100644 (file)
@@ -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]);
        }