forked from quickshell/quickshell
		
	fix(wayland): fix ext screens resetting and causing protocol error
Could not reproduce this personally but I am told this fixes it.
This commit is contained in:
		
							parent
							
								
									48bdcf4db2
								
							
						
					
					
						commit
						4eac0b40c3
					
				
					 2 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -68,7 +68,10 @@ bool LockWindowExtension::attach(QWindow* window, SessionLockManager* manager) {
 | 
			
		|||
	if (current != nullptr) {
 | 
			
		||||
		current->surface->setExtension(this);
 | 
			
		||||
	} else {
 | 
			
		||||
		// Qt appears to be resetting the window's screen on creation on some systems. This works around it.
 | 
			
		||||
		auto* screen = window->screen();
 | 
			
		||||
		window->create();
 | 
			
		||||
		window->setScreen(screen);
 | 
			
		||||
 | 
			
		||||
		waylandWindow = dynamic_cast<QtWaylandClient::QWaylandWindow*>(window->handle());
 | 
			
		||||
		if (waylandWindow == nullptr) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -54,7 +54,10 @@ bool LayershellWindowExtension::attach(QWindow* window) {
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	if (!hasSurface) {
 | 
			
		||||
		// Qt appears to be resetting the window's screen on creation on some systems. This works around it.
 | 
			
		||||
		auto* screen = window->screen();
 | 
			
		||||
		window->create();
 | 
			
		||||
		window->setScreen(screen);
 | 
			
		||||
 | 
			
		||||
		auto* waylandWindow = dynamic_cast<QtWaylandClient::QWaylandWindow*>(window->handle());
 | 
			
		||||
		if (waylandWindow == nullptr) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue