forked from quickshell/quickshell
		
	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
					
				
					 1 changed files with 8 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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 {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue