forked from quickshell/quickshell
		
	wayland/lock: only update surfaces on screens changed if locked
Fixes crash when a WlSessionLock object exists but is unlocked and a screen is added or removed.
This commit is contained in:
		
							parent
							
								
									59cf60d83e
								
							
						
					
					
						commit
						72956185bd
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -130,7 +130,11 @@ void WlSessionLock::unlock() {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void WlSessionLock::onScreensChanged() { this->updateSurfaces(true); }
 | 
					void WlSessionLock::onScreensChanged() {
 | 
				
			||||||
 | 
						if (this->manager != nullptr && this->manager->isLocked()) {
 | 
				
			||||||
 | 
							this->updateSurfaces(true);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool WlSessionLock::isLocked() const {
 | 
					bool WlSessionLock::isLocked() const {
 | 
				
			||||||
	return this->manager == nullptr ? this->lockTarget : this->manager->isLocked();
 | 
						return this->manager == nullptr ? this->lockTarget : this->manager->isLocked();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue