Fix build error

This commit is contained in:
Victor Tran 2023-10-15 15:08:12 +11:00
parent dccca833e4
commit 8f18e7bae2
No known key found for this signature in database
2 changed files with 7 additions and 1 deletions

View file

@ -105,6 +105,10 @@ void StickyKeys::cycleModifier(Qt::KeyboardModifier modifier) {
d->heldModifiers = d->heldModifiers.setFlag(modifier);
}
sendUpdatedKeys();
}
void StickyKeys::sendUpdatedKeys() {
int heldMods = 0;
if (d->heldModifiers.testFlag(Qt::ControlModifier)) heldMods |= TDESKTOPENVIRONMENT_ACCESSIBILITY_STICKY_KEYS_V1_MODIFIER_CONTROL;
if (d->heldModifiers.testFlag(Qt::AltModifier)) heldMods |= TDESKTOPENVIRONMENT_ACCESSIBILITY_STICKY_KEYS_V1_MODIFIER_ALT;
@ -184,7 +188,8 @@ void StickyKeys::keyboardButtonPressed(wf::input_event_signal<wlr_keyboard_key_e
// Clear out all the held modifiers
d->heldModifiers = Qt::NoModifier;
tdesktopenvironment_accessibility_sticky_keys_v1_send_sticky_keys_held(d->tdeA11yStickyKeys, heldMods);
sendUpdatedKeys();
}
}
}

View file

@ -28,6 +28,7 @@ class StickyKeys : public AbstractA11yController {
void updateStickyKeysState();
void cycleModifier(Qt::KeyboardModifier modifier);
void sendUpdatedKeys();
};
#endif // STICKYKEYS_H