diff --git a/shell/panelview.h b/shell/panelview.h --- a/shell/panelview.h +++ b/shell/panelview.h @@ -198,6 +198,7 @@ bool containmentContainsPosition(const QPointF &point) const; QPointF positionAdjustedForContainment(const QPointF &point) const; void setupWaylandIntegration(); + void visibilityModeToWayland(); bool edgeActivated() const; void updateEnabledBorders(); bool canSetStrut() const; diff --git a/shell/panelview.cpp b/shell/panelview.cpp --- a/shell/panelview.cpp +++ b/shell/panelview.cpp @@ -316,12 +316,39 @@ m_corona->requestApplicationConfigSync(); } + visibilityModeToWayland(); updateStruts(); emit visibilityModeChanged(); restoreAutoHide(); } +void PanelView::visibilityModeToWayland() +{ + if (!m_shellSurface) { + return; + } + KWayland::Client::PlasmaShellSurface::PanelBehavior behavior; + switch (m_visibilityMode) { + case NormalPanel: + behavior = KWayland::Client::PlasmaShellSurface::PanelBehavior::AlwaysVisible; + break; + case AutoHide: + behavior = KWayland::Client::PlasmaShellSurface::PanelBehavior::AutoHide; + break; + case LetWindowsCover: + behavior = KWayland::Client::PlasmaShellSurface::PanelBehavior::WindowsCanCover; + break; + case WindowsGoBelow: + behavior = KWayland::Client::PlasmaShellSurface::PanelBehavior::WindowsGoBelow; + break; + default: + Q_UNREACHABLE(); + return; + } + m_shellSurface->setPanelBehavior(behavior); +} + PanelView::VisibilityMode PanelView::visibilityMode() const { return m_visibilityMode;