wayland/layershell: ensure state changes are comitted without render
Previously they were not comitted and did not apply until the next rendered frame.
This commit is contained in:
parent
67783ec24c
commit
523de78796
|
@ -119,24 +119,31 @@ void QSWaylandLayerSurface::setWindowGeometry(const QRect& geometry) {
|
||||||
|
|
||||||
QWindow* QSWaylandLayerSurface::qwindow() { return this->window()->window(); }
|
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() {
|
void QSWaylandLayerSurface::updateAnchors() {
|
||||||
this->set_anchor(toWaylandAnchors(this->ext->mAnchors));
|
this->set_anchor(toWaylandAnchors(this->ext->mAnchors));
|
||||||
this->setWindowGeometry(this->window()->windowContentGeometry());
|
this->setWindowGeometry(this->window()->windowContentGeometry());
|
||||||
|
this->window()->waylandSurface()->commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QSWaylandLayerSurface::updateMargins() {
|
void QSWaylandLayerSurface::updateMargins() {
|
||||||
auto& margins = this->ext->mMargins;
|
auto& margins = this->ext->mMargins;
|
||||||
this->set_margin(margins.mTop, margins.mRight, margins.mBottom, margins.mLeft);
|
this->set_margin(margins.mTop, margins.mRight, margins.mBottom, margins.mLeft);
|
||||||
|
this->window()->waylandSurface()->commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QSWaylandLayerSurface::updateExclusiveZone() {
|
void QSWaylandLayerSurface::updateExclusiveZone() {
|
||||||
this->set_exclusive_zone(this->ext->mExclusiveZone);
|
this->set_exclusive_zone(this->ext->mExclusiveZone);
|
||||||
|
this->window()->waylandSurface()->commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QSWaylandLayerSurface::updateKeyboardFocus() {
|
void QSWaylandLayerSurface::updateKeyboardFocus() {
|
||||||
this->set_keyboard_interactivity(toWaylandKeyboardFocus(this->ext->mKeyboardFocus));
|
this->set_keyboard_interactivity(toWaylandKeyboardFocus(this->ext->mKeyboardFocus));
|
||||||
|
this->window()->waylandSurface()->commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
QtWayland::zwlr_layer_shell_v1::layer toWaylandLayer(const WlrLayer::Enum& layer) noexcept {
|
QtWayland::zwlr_layer_shell_v1::layer toWaylandLayer(const WlrLayer::Enum& layer) noexcept {
|
||||||
|
|
Loading…
Reference in a new issue