From 523de78796c0f3ff3a98f737b8056589df0c7c79 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Thu, 13 Jun 2024 16:23:28 -0700 Subject: [PATCH] wayland/layershell: ensure state changes are comitted without render Previously they were not comitted and did not apply until the next rendered frame. --- src/wayland/wlr_layershell/surface.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/wayland/wlr_layershell/surface.cpp b/src/wayland/wlr_layershell/surface.cpp index 5c369f2..695ecc4 100644 --- a/src/wayland/wlr_layershell/surface.cpp +++ b/src/wayland/wlr_layershell/surface.cpp @@ -119,24 +119,31 @@ void QSWaylandLayerSurface::setWindowGeometry(const QRect& geometry) { QWindow* QSWaylandLayerSurface::qwindow() { return this->window()->window(); } -void QSWaylandLayerSurface::updateLayer() { this->set_layer(toWaylandLayer(this->ext->mLayer)); } +void QSWaylandLayerSurface::updateLayer() { + this->set_layer(toWaylandLayer(this->ext->mLayer)); + this->window()->waylandSurface()->commit(); +} void QSWaylandLayerSurface::updateAnchors() { this->set_anchor(toWaylandAnchors(this->ext->mAnchors)); this->setWindowGeometry(this->window()->windowContentGeometry()); + this->window()->waylandSurface()->commit(); } void QSWaylandLayerSurface::updateMargins() { auto& margins = this->ext->mMargins; this->set_margin(margins.mTop, margins.mRight, margins.mBottom, margins.mLeft); + this->window()->waylandSurface()->commit(); } void QSWaylandLayerSurface::updateExclusiveZone() { this->set_exclusive_zone(this->ext->mExclusiveZone); + this->window()->waylandSurface()->commit(); } void QSWaylandLayerSurface::updateKeyboardFocus() { this->set_keyboard_interactivity(toWaylandKeyboardFocus(this->ext->mKeyboardFocus)); + this->window()->waylandSurface()->commit(); } QtWayland::zwlr_layer_shell_v1::layer toWaylandLayer(const WlrLayer::Enum& layer) noexcept {