Call QInputMethod::show on TouchEnd
Qt calls QInputMethod::show on mouseReleaseEvent, but tdesktop sets Qt::WA_AcceptTouchEvents, so Qt's callback is never called and the keyboard is never shown. Adding the same to TouchEnd event should synchornize the behavior. QInputMethod::hide is called in QWidget::focusOutEvent and shouldn't be affected.
This commit is contained in:
parent
3177c78bda
commit
397be4f175
1 changed files with 6 additions and 0 deletions
|
|
@ -1045,6 +1045,8 @@ void FlatInput::touchEvent(QTouchEvent *e) {
|
|||
if (_touchRightButton) {
|
||||
QContextMenuEvent contextEvent(QContextMenuEvent::Mouse, mapped, _touchStart);
|
||||
contextMenuEvent(&contextEvent);
|
||||
} else {
|
||||
QGuiApplication::inputMethod()->show();
|
||||
}
|
||||
}
|
||||
if (weak) {
|
||||
|
|
@ -1654,6 +1656,8 @@ void InputField::handleTouchEvent(QTouchEvent *e) {
|
|||
if (_touchRightButton) {
|
||||
QContextMenuEvent contextEvent(QContextMenuEvent::Mouse, mapped, _touchStart);
|
||||
contextMenuEvent(&contextEvent);
|
||||
} else {
|
||||
QGuiApplication::inputMethod()->show();
|
||||
}
|
||||
}
|
||||
if (weak) {
|
||||
|
|
@ -3855,6 +3859,8 @@ void MaskedInputField::touchEvent(QTouchEvent *e) {
|
|||
if (_touchRightButton) {
|
||||
QContextMenuEvent contextEvent(QContextMenuEvent::Mouse, mapped, _touchStart);
|
||||
contextMenuEvent(&contextEvent);
|
||||
} else {
|
||||
QGuiApplication::inputMethod()->show();
|
||||
}
|
||||
}
|
||||
if (weak) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue