fix #432,signal update struts on dock screenchange

pull/1/head
Michail Vourlakos 8 years ago
parent dee8ebcf8b
commit bd9021a412

@ -256,6 +256,7 @@ void DockView::setScreenToFollow(QScreen *screen, bool updateScreenId)
this->containment()->reactToScreenChange();
syncGeometry();
updateAbsDockGeometry(true);
emit screenGeometryChanged();
}
@ -319,6 +320,13 @@ void DockView::reconsiderScreen()
void DockView::screenChanged(QScreen *scr)
{
m_screenSyncTimer.start();
//! this is needed in order to update the struts on screen change
//! and even though the geometry has been set correctly the offsets
//! of the screen must be updated to the new ones
if (m_visibility && m_visibility->mode() == Latte::Dock::AlwaysVisible) {
updateAbsDockGeometry(true);
}
}
void DockView::addNewDock()
@ -526,12 +534,12 @@ void DockView::setLocalGeometry(const QRect &geometry)
updateAbsDockGeometry();
}
void DockView::updateAbsDockGeometry()
void DockView::updateAbsDockGeometry(bool bypassChecks)
{
QRect absGeometry {x() + m_localGeometry.x(), y() + m_localGeometry.y()
, m_localGeometry.width() - 1, m_localGeometry.height() - 1};
if (m_absGeometry == absGeometry)
if (m_absGeometry == absGeometry && !bypassChecks)
return;
m_absGeometry = absGeometry;

@ -163,7 +163,7 @@ public slots:
Q_INVOKABLE void closeApplication();
void updateAbsDockGeometry();
void updateAbsDockGeometry(bool bypassChecks = false);
protected slots:
void showConfigurationInterface(Plasma::Applet *applet) override;

Loading…
Cancel
Save