TextInputV2: Don't drop or convert modifiers for keysym events
This commit is contained in:
parent
25942d6fcb
commit
b58cc08a36
3 changed files with 12 additions and 13 deletions
|
@ -191,27 +191,27 @@ void TextInputV2InterfacePrivate::commitString(const QString &text)
|
|||
}
|
||||
}
|
||||
|
||||
void TextInputV2InterfacePrivate::keysymPressed(quint32 keysym, Qt::KeyboardModifiers modifiers)
|
||||
void TextInputV2InterfacePrivate::keysymPressed(quint32 keysym, quint32 modifiers)
|
||||
{
|
||||
if (!surface) {
|
||||
return;
|
||||
}
|
||||
Q_UNUSED(modifiers)
|
||||
|
||||
const QList<Resource *> textInputs = textInputsForClient(surface->client());
|
||||
for (auto resource : textInputs) {
|
||||
send_keysym(resource->handle, seat ? seat->timestamp() : 0, keysym, WL_KEYBOARD_KEY_STATE_PRESSED, 0);
|
||||
send_keysym(resource->handle, seat ? seat->timestamp() : 0, keysym, WL_KEYBOARD_KEY_STATE_PRESSED, modifiers);
|
||||
}
|
||||
}
|
||||
|
||||
void TextInputV2InterfacePrivate::keysymReleased(quint32 keysym, Qt::KeyboardModifiers modifiers)
|
||||
void TextInputV2InterfacePrivate::keysymReleased(quint32 keysym, quint32 modifiers)
|
||||
{
|
||||
if (!surface) {
|
||||
return;
|
||||
}
|
||||
Q_UNUSED(modifiers)
|
||||
|
||||
const QList<Resource *> textInputs = textInputsForClient(surface->client());
|
||||
for (auto resource : textInputs) {
|
||||
send_keysym(resource->handle, seat ? seat->timestamp() : 0, keysym, WL_KEYBOARD_KEY_STATE_RELEASED, 0);
|
||||
send_keysym(resource->handle, seat ? seat->timestamp() : 0, keysym, WL_KEYBOARD_KEY_STATE_RELEASED, modifiers);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -438,13 +438,12 @@ void TextInputV2Interface::commitString(const QString &text)
|
|||
d->commitString(text);
|
||||
}
|
||||
|
||||
void TextInputV2Interface::keysymPressed(quint32 keysym, Qt::KeyboardModifiers modifiers)
|
||||
void TextInputV2Interface::keysymPressed(quint32 keysym, quint32 modifiers)
|
||||
{
|
||||
Q_UNUSED(modifiers)
|
||||
d->keysymPressed(keysym, modifiers);
|
||||
}
|
||||
|
||||
void TextInputV2Interface::keysymReleased(quint32 keysym, Qt::KeyboardModifiers modifiers)
|
||||
void TextInputV2Interface::keysymReleased(quint32 keysym, quint32 modifiers)
|
||||
{
|
||||
d->keysymReleased(keysym, modifiers);
|
||||
}
|
||||
|
|
|
@ -192,8 +192,8 @@ public:
|
|||
*/
|
||||
void setTextDirection(Qt::LayoutDirection direction);
|
||||
|
||||
void keysymPressed(quint32 keysym, Qt::KeyboardModifiers modifiers = Qt::NoModifier);
|
||||
void keysymReleased(quint32 keysym, Qt::KeyboardModifiers modifiers = Qt::NoModifier);
|
||||
void keysymPressed(quint32 keysym, quint32 modifiers = 0);
|
||||
void keysymReleased(quint32 keysym, quint32 modifiers = 0);
|
||||
|
||||
/**
|
||||
* Informs the client about changes in the visibility of the input panel (virtual keyboard).
|
||||
|
|
|
@ -42,8 +42,8 @@ public:
|
|||
void setTextDirection(Qt::LayoutDirection direction);
|
||||
void setPreEditCursor(qint32 index);
|
||||
void setCursorPosition(qint32 index, qint32 anchor);
|
||||
void keysymPressed(quint32 keysym, Qt::KeyboardModifiers modifiers);
|
||||
void keysymReleased(quint32 keysym, Qt::KeyboardModifiers modifiers);
|
||||
void keysymPressed(quint32 keysym, quint32 modifiers);
|
||||
void keysymReleased(quint32 keysym, quint32 modifiers);
|
||||
void sendInputPanelState();
|
||||
void sendLanguage();
|
||||
|
||||
|
|
Loading…
Reference in a new issue