forked from quickshell/quickshell
		
	core/window: fix null QObject::connect in ProxyWindowBase::setScreen
This commit is contained in:
		
							parent
							
								
									67524f9d8e
								
							
						
					
					
						commit
						8863bf55ff
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -331,8 +331,10 @@ void ProxyWindowBase::setScreen(QuickshellScreenInfo* screen) {
 | 
			
		|||
		QObject::disconnect(this->mScreen, nullptr, this, nullptr);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (this->qscreen() != qscreen) {
 | 
			
		||||
		this->mScreen = qscreen;
 | 
			
		||||
	auto* oldScreen = this->qscreen();
 | 
			
		||||
	this->mScreen = qscreen;
 | 
			
		||||
 | 
			
		||||
	if (oldScreen != qscreen) {
 | 
			
		||||
		if (this->window == nullptr) {
 | 
			
		||||
			emit this->screenChanged();
 | 
			
		||||
		} else if (qscreen) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue