mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-12 01:17:55 +03:00
support plasmoid.screenGeometry properly
BUG: 401333
This commit is contained in:
parent
6c58115f9b
commit
8294bd892c
@ -221,6 +221,15 @@ void DockCorona::load()
|
||||
}
|
||||
|
||||
m_layoutManager->loadLayoutOnStartup(loadLayoutName);
|
||||
|
||||
|
||||
//! load screens signals such screenGeometryChanged in order to support
|
||||
//! plasmoid.screenGeometry properly
|
||||
for (QScreen *screen : qGuiApp->screens()) {
|
||||
addOutput(screen);
|
||||
}
|
||||
|
||||
connect(qGuiApp, &QGuiApplication::screenAdded, this, &DockCorona::addOutput, Qt::UniqueConnection);
|
||||
}
|
||||
}
|
||||
|
||||
@ -608,6 +617,19 @@ void DockCorona::addOutput(QScreen *screen)
|
||||
int newId = m_screenPool->firstAvailableId();
|
||||
m_screenPool->insertScreenMapping(newId, screen->name());
|
||||
}
|
||||
|
||||
connect(screen, &QScreen::geometryChanged, this, [ = ]() {
|
||||
const int id = m_screenPool->id(screen->name());
|
||||
|
||||
if (id >= 0) {
|
||||
emit screenGeometryChanged(id);
|
||||
emit availableScreenRegionChanged();
|
||||
emit availableScreenRectChanged();
|
||||
}
|
||||
});
|
||||
|
||||
emit availableScreenRectChanged();
|
||||
emit screenAdded(m_screenPool->id(screen->name()));
|
||||
}
|
||||
|
||||
void DockCorona::primaryOutputChanged()
|
||||
|
@ -659,7 +659,7 @@ Item {
|
||||
id: tasksModel
|
||||
|
||||
virtualDesktop: virtualDesktopInfo.currentDesktop
|
||||
screenGeometry: latteDock ? latteDock.screenGeometry : plasmoid.screenGeometry
|
||||
screenGeometry: plasmoid.screenGeometry
|
||||
// comment in order to support LTS Plasma 5.8
|
||||
// screen: plasmoid.screen
|
||||
activity: activityInfo.currentActivity
|
||||
|
Loading…
Reference in New Issue
Block a user