mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	xwayland: fix client request-unmap bug
Remove foreign-toplevel handle when a client sends a request-unmap to a minimized (therefore unmapped) view.
This commit is contained in:
		
							parent
							
								
									dfc0dfba6d
								
							
						
					
					
						commit
						d961dbf9b0
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -489,7 +489,7 @@ static void
 | 
				
			||||||
xwayland_view_unmap(struct view *view, bool client_request)
 | 
					xwayland_view_unmap(struct view *view, bool client_request)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if (!view->mapped) {
 | 
						if (!view->mapped) {
 | 
				
			||||||
		return;
 | 
							goto out;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	view->mapped = false;
 | 
						view->mapped = false;
 | 
				
			||||||
	wl_list_remove(&view->commit.link);
 | 
						wl_list_remove(&view->commit.link);
 | 
				
			||||||
| 
						 | 
					@ -501,6 +501,7 @@ xwayland_view_unmap(struct view *view, bool client_request)
 | 
				
			||||||
	 * than just minimized), destroy the foreign toplevel handle so
 | 
						 * than just minimized), destroy the foreign toplevel handle so
 | 
				
			||||||
	 * the unmapped view doesn't show up in panels and the like.
 | 
						 * the unmapped view doesn't show up in panels and the like.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
 | 
					out:
 | 
				
			||||||
	if (client_request && view->toplevel.handle) {
 | 
						if (client_request && view->toplevel.handle) {
 | 
				
			||||||
		wlr_foreign_toplevel_handle_v1_destroy(view->toplevel.handle);
 | 
							wlr_foreign_toplevel_handle_v1_destroy(view->toplevel.handle);
 | 
				
			||||||
		view->toplevel.handle = NULL;
 | 
							view->toplevel.handle = NULL;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue