1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-02-11 01:58:44 +03:00

update docksCount on screen changes

This commit is contained in:
Michail Vourlakos 2017-06-12 00:52:17 +03:00
parent a05785e34b
commit 9ccf9978be
2 changed files with 2 additions and 1 deletions

View File

@ -728,7 +728,7 @@ QList<Plasma::Types::Location> DockCorona::freeEdges(QScreen *screen) const
Types::TopEdge, Types::RightEdge};
for (auto *view : m_dockViews) {
if (view && view->currentScreen() == screen->name() && view->session() == m_session) {
if (view && view->screen() == screen && view->session() == m_session) {
edges.removeOne(view->location());
}
}

View File

@ -169,6 +169,7 @@ DockView::~DockView()
void DockView::init()
{
connect(this, &QQuickWindow::screenChanged, this, &DockView::screenChanged);
connect(this, &QQuickWindow::screenChanged, this, &DockView::docksCountChanged);
connect(qGuiApp, &QGuiApplication::screenAdded, this, &DockView::screenChanged);
connect(qGuiApp, &QGuiApplication::primaryScreenChanged, this, &DockView::screenChanged);
connect(this, &DockView::screenGeometryChanged, this, &DockView::syncGeometry);