mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-08 13:18:09 +03:00
do not allow struts when view is offscreen
This commit is contained in:
parent
62ed63daf1
commit
5e0feef0f6
@ -266,6 +266,11 @@ void Positioner::setInRelocationShowing(bool active)
|
||||
}
|
||||
}
|
||||
|
||||
bool Positioner::isOffScreen() const
|
||||
{
|
||||
return (m_validGeometry.x()<-500 || m_validGeometry.y()<-500);
|
||||
}
|
||||
|
||||
int Positioner::currentScreenId() const
|
||||
{
|
||||
auto *latteCorona = qobject_cast<Latte::Corona *>(m_view->corona());
|
||||
|
@ -78,6 +78,8 @@ public:
|
||||
bool isStickedOnBottomEdge() const;
|
||||
void setIsStickedOnBottomEdge(bool sticked);
|
||||
|
||||
bool isOffScreen() const;
|
||||
|
||||
QRect canvasGeometry();
|
||||
|
||||
void setScreenToFollow(QScreen *scr, bool updateScreenId = true);
|
||||
|
@ -422,6 +422,10 @@ void VisibilityManager::updateStrutsBasedOnLayoutsAndActivities(bool forceUpdate
|
||||
|
||||
bool VisibilityManager::canSetStrut() const
|
||||
{
|
||||
if (m_latteView->positioner()->isOffScreen()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!KWindowSystem::isPlatformX11()) {
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user