1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-23 13:33:50 +03:00

position properly primary config win on first call

--sometimes when the primary config window is first called
it was wrongly positioned at most bottom-left screen corner
This commit is contained in:
Michail Vourlakos 2021-02-26 17:12:59 +02:00
parent 9e487b613b
commit 53231392ba

View File

@ -321,7 +321,6 @@ void PrimaryConfigView::instantUpdateAvailableScreenGeometry()
QString activityid = m_latteView->layout()->lastUsedActivity();
m_availableScreenGeometry = m_corona->availableScreenRectWithCriteria(currentScrId, activityid, ignoreModes, {}, false, true);
emit availableScreenGeometryChanged();
}
@ -407,7 +406,9 @@ void PrimaryConfigView::syncGeometry()
auto geometry = QRect(position.x(), position.y(), size.width(), size.height());
if (m_geometryWhenVisible == geometry) {
QRect winGeometry(x(), y(), width(), height());
if (m_geometryWhenVisible == geometry && winGeometry == geometry) {
return;
}