diff --git a/shell/panelview.cpp b/shell/panelview.cpp index 13cf79b6d..953e42c0a 100644 --- a/shell/panelview.cpp +++ b/shell/panelview.cpp @@ -316,12 +316,39 @@ void PanelView::setVisibilityMode(PanelView::VisibilityMode mode) 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; diff --git a/shell/panelview.h b/shell/panelview.h index 11f50ff0c..36c414e10 100644 --- a/shell/panelview.h +++ b/shell/panelview.h @@ -198,6 +198,7 @@ private: bool containmentContainsPosition(const QPointF &point) const; QPointF positionAdjustedForContainment(const QPointF &point) const; void setupWaylandIntegration(); + void visibilityModeToWayland(); bool edgeActivated() const; void updateEnabledBorders(); bool canSetStrut() const;