wasm: fix window activation
This fixes window activation of dialogs and tooltips In the case of tooltips, We were activating the window being removed. In the case of dialogs, we need to raise the window before requesting the activation. Change-Id: Ie989e6d92afedf1895b5e188f0695f6254d70272 Fixes: QTBUG-94918 Pick-to: 5.15 6.2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
b1820295e1
commit
3d89257ce4
@ -131,8 +131,8 @@ void QWasmCompositor::removeWindow(QWasmWindow *window)
|
||||
if (!m_windowStack.isEmpty() && !QGuiApplication::focusWindow()) {
|
||||
auto lastWindow = m_windowStack.last();
|
||||
lastWindow->requestActivateWindow();
|
||||
notifyTopWindowChanged(lastWindow);
|
||||
}
|
||||
notifyTopWindowChanged(window);
|
||||
}
|
||||
|
||||
void QWasmCompositor::setVisible(QWasmWindow *window, bool visible)
|
||||
|
@ -423,4 +423,11 @@ bool QWasmWindow::windowIsPopupType(Qt::WindowType type) const
|
||||
return false;
|
||||
}
|
||||
|
||||
void QWasmWindow::requestActivateWindow()
|
||||
{
|
||||
if (window()->isTopLevel())
|
||||
raise();
|
||||
QPlatformWindow::requestActivateWindow();
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -74,6 +74,7 @@ public:
|
||||
QRect normalGeometry() const override;
|
||||
qreal devicePixelRatio() const override;
|
||||
void requestUpdate() override;
|
||||
void requestActivateWindow() override;
|
||||
|
||||
QWasmScreen *platformScreen() const;
|
||||
void setBackingStore(QWasmBackingStore *store) { m_backingStore = store; }
|
||||
|
Loading…
Reference in New Issue
Block a user