diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/ios/qioscontext.mm | 7 | ||||
-rw-r--r-- | src/plugins/platforms/ios/quiview.mm | 12 | ||||
-rw-r--r-- | src/plugins/platforms/wasm/qwasmscreen.cpp | 6 | ||||
-rw-r--r-- | src/plugins/platforms/windows/qwindowsinputcontext.cpp | 12 | ||||
-rw-r--r-- | src/plugins/platforms/windows/qwindowspointerhandler.cpp | 4 |
5 files changed, 29 insertions, 12 deletions
diff --git a/src/plugins/platforms/ios/qioscontext.mm b/src/plugins/platforms/ios/qioscontext.mm index c9509ae599..cb1a8a96f8 100644 --- a/src/plugins/platforms/ios/qioscontext.mm +++ b/src/plugins/platforms/ios/qioscontext.mm @@ -332,11 +332,8 @@ bool QIOSContext::verifyGraphicsHardwareAvailability() ); }); - if (applicationBackgrounded) { - static const char warning[] = "OpenGL ES calls are not allowed while an application is backgrounded"; - Q_ASSERT_X(!applicationBackgrounded, "QIOSContext", warning); - qCWarning(lcQpaGLContext, warning); - } + if (applicationBackgrounded) + qCWarning(lcQpaGLContext, "OpenGL ES calls are not allowed while an application is backgrounded"); return !applicationBackgrounded; } diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm index e64c05d099..4e3657ec37 100644 --- a/src/plugins/platforms/ios/quiview.mm +++ b/src/plugins/platforms/ios/quiview.mm @@ -628,6 +628,18 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet") #endif } +#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(130000) +- (void)addInteraction:(id<UIInteraction>)interaction +{ + if (__builtin_available(iOS 13.0, *)) { + if ([interaction isKindOfClass:UITextInteraction.class]) + return; // Prevent iOS from adding UITextInteraction + } + + [super addInteraction:interaction]; +} +#endif + @end @implementation UIView (QtHelpers) diff --git a/src/plugins/platforms/wasm/qwasmscreen.cpp b/src/plugins/platforms/wasm/qwasmscreen.cpp index e536bc0ee3..37f1ea832a 100644 --- a/src/plugins/platforms/wasm/qwasmscreen.cpp +++ b/src/plugins/platforms/wasm/qwasmscreen.cpp @@ -186,8 +186,12 @@ void QWasmScreen::updateQScreenAndCanvasRenderSize() canvas.set("width", canvasSize.width()); canvas.set("height", canvasSize.height()); + QPoint offset; + offset.setX(emscripten::val::global(canvasId.constData())["offsetTop"].as<int>()); + offset.setY(emscripten::val::global(canvasId.constData())["offsetLeft"].as<int>()); + emscripten::val rect = canvas.call<emscripten::val>("getBoundingClientRect"); - QPoint position(rect["left"].as<int>(), rect["top"].as<int>()); + QPoint position(rect["left"].as<int>() - offset.x(), rect["top"].as<int>() - offset.y()); setGeometry(QRect(position, cssSize.toSize())); m_compositor->redrawWindowContent(); diff --git a/src/plugins/platforms/windows/qwindowsinputcontext.cpp b/src/plugins/platforms/windows/qwindowsinputcontext.cpp index d5258ca6a3..079c25f9eb 100644 --- a/src/plugins/platforms/windows/qwindowsinputcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsinputcontext.cpp @@ -280,13 +280,15 @@ void QWindowsInputContext::showInputPanel() // with Windows 10 if the Windows IME is (re)enabled _after_ the caret is shown. if (m_caretCreated) { cursorRectChanged(); - // We only call ShowCaret() on Windows 10 as in earlier versions the caret - // would actually be visible (QTBUG-74492) and the workaround for the - // Surface seems unnecessary there anyway. But leave it hidden for IME. - if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::Windows10) + // We only call ShowCaret() on Windows 10 after 1703 as in earlier versions + // the caret would actually be visible (QTBUG-74492) and the workaround for + // the Surface seems unnecessary there anyway. But leave it hidden for IME. + if (QOperatingSystemVersion::current() >= + QOperatingSystemVersion(QOperatingSystemVersion::Windows, 10, 0, 16299)) { ShowCaret(platformWindow->handle()); - else + } else { HideCaret(platformWindow->handle()); + } setWindowsImeEnabled(platformWindow, false); setWindowsImeEnabled(platformWindow, true); } diff --git a/src/plugins/platforms/windows/qwindowspointerhandler.cpp b/src/plugins/platforms/windows/qwindowspointerhandler.cpp index cffd8427a2..b477147da7 100644 --- a/src/plugins/platforms/windows/qwindowspointerhandler.cpp +++ b/src/plugins/platforms/windows/qwindowspointerhandler.cpp @@ -579,7 +579,9 @@ bool QWindowsPointerHandler::translatePenEvent(QWindow *window, HWND hwnd, QtWin const QTabletEvent::TabletDevice device = QTabletEvent::Stylus; QTabletEvent::PointerType type; - Qt::MouseButtons mouseButtons; + // Since it may be the middle button, so if the checks fail then it should + // be set to Middle if it was used. + Qt::MouseButtons mouseButtons = queryMouseButtons(); const bool pointerInContact = IS_POINTER_INCONTACT_WPARAM(msg.wParam); if (pointerInContact) |