effect: Overwrite the output in OffscreenQuickView::setGeometry()
It seems like QWindow::setGeometry() won't update the associated output if no platform window has been created, which is the case when running overview or any other qml effect. It's not clear whether this is a Qt bug or intended behavior. qwindow.cpp contains comments assuming that the window is on the primary output if no platform window exists.
This commit is contained in:
parent
601d33f294
commit
35572904fc
1 changed files with 2 additions and 0 deletions
|
@ -447,6 +447,8 @@ void OffscreenQuickView::setGeometry(const QRect &rect)
|
|||
{
|
||||
const QRect oldGeometry = d->m_view->geometry();
|
||||
d->m_view->setGeometry(rect);
|
||||
// QWindow::setGeometry() won't sync output if there's no platform window.
|
||||
d->m_view->setScreen(QGuiApplication::screenAt(rect.center()));
|
||||
Q_EMIT geometryChanged(oldGeometry, rect);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue