Commit 7852de5e authored by Alexander Kandaurov's avatar Alexander Kandaurov Committed by Nate Graham
Browse files

Notify of screen geometry changes only after DesktopView has updated

Currently updating the DesktopView geometry and emitting signals notifying of changes to screen geometry are connected independently to QScreen::geometryChanged(), while screenGeometry() as well as availableScreenRect() and availableScreenRegion() depend on the DesktopView geometry. The incorrect order of slots being called causes the task manager to behave incorrectly on screen configuration changes, displaying either no windows or windows from a wrong screen. This also affects the desktop pager widget when configured to show the current desktop only.

BUG: 373075
parent a9cc8508
......@@ -313,6 +313,7 @@ void DesktopView::screenGeometryChanged()
if (m_shellSurface) {
emit geometryChanged();
......@@ -96,6 +96,7 @@ Q_SIGNALS:
void stayBehindChanged();
void windowTypeChanged();
void candidateContainmentsChanged();
void geometryChanged();
void coronaPackageChanged(const KPackage::Package &package);
......@@ -1286,8 +1286,8 @@ void ShellCorona::addOutput(QScreen* screen)
if (view->rendererInterface()->graphicsApi() != QSGRendererInterface::Software) {
connect(view, &QQuickWindow::sceneGraphError, this, &ShellCorona::glInitializationFailed);
connect(screen, &QScreen::geometryChanged, this, [=]() {
const int id = m_screenPool->id(screen->name());
connect(view, &DesktopView::geometryChanged, this, [=]() {
const int id = m_screenPool->id(view->screen()->name());
if (id >= 0) {
emit screenGeometryChanged(id);
emit availableScreenRegionChanged();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment