mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	xdg_shell: Fix crash if popup generates while toplevel is in the scratchpad
This commit is contained in:
		
							parent
							
								
									08c1946d71
								
							
						
					
					
						commit
						33cfdbe886
					
				
					 1 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
					@ -67,7 +67,13 @@ static void popup_unconstrain(struct sway_xdg_popup *popup) {
 | 
				
			||||||
	struct sway_view *view = popup->child.view;
 | 
						struct sway_view *view = popup->child.view;
 | 
				
			||||||
	struct wlr_xdg_popup *wlr_popup = popup->wlr_xdg_popup;
 | 
						struct wlr_xdg_popup *wlr_popup = popup->wlr_xdg_popup;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct sway_output *output = view->container->pending.workspace->output;
 | 
						struct sway_workspace *workspace = view->container->pending.workspace;
 | 
				
			||||||
 | 
						if (!workspace) {
 | 
				
			||||||
 | 
							// is null if in the scratchpad
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						struct sway_output *output = workspace->output;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// the output box expressed in the coordinate system of the toplevel parent
 | 
						// the output box expressed in the coordinate system of the toplevel parent
 | 
				
			||||||
	// of the popup
 | 
						// of the popup
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue