forked from quickshell/quickshell
		
	core/window: fix QsWindow being null for WlrLayershell
This commit is contained in:
		
							parent
							
								
									fb37be7611
								
							
						
					
					
						commit
						3cc7ced3a0
					
				
					 2 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -542,7 +542,8 @@ void ProxyWindowAttached::updateWindow() {
 | 
				
			||||||
void ProxyWindowAttached::setWindow(ProxyWindowBase* window) {
 | 
					void ProxyWindowAttached::setWindow(ProxyWindowBase* window) {
 | 
				
			||||||
	if (window == this->mWindow) return;
 | 
						if (window == this->mWindow) return;
 | 
				
			||||||
	this->mWindow = window;
 | 
						this->mWindow = window;
 | 
				
			||||||
	this->mWindowInterface = window ? qobject_cast<WindowInterface*>(window->parent()) : nullptr;
 | 
						auto* parentInterface = window ? qobject_cast<WindowInterface*>(window->parent()) : nullptr;
 | 
				
			||||||
 | 
						this->mWindowInterface = parentInterface ? static_cast<QObject*>(parentInterface) : window;
 | 
				
			||||||
	emit this->windowChanged();
 | 
						emit this->windowChanged();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -220,7 +220,7 @@ protected:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
	ProxyWindowBase* mWindow = nullptr;
 | 
						ProxyWindowBase* mWindow = nullptr;
 | 
				
			||||||
	WindowInterface* mWindowInterface = nullptr;
 | 
						QObject* mWindowInterface = nullptr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	void setWindow(ProxyWindowBase* window);
 | 
						void setWindow(ProxyWindowBase* window);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue