mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	handlers: preserve parent pointer value
This commit is contained in:
		
							parent
							
								
									a996ee485d
								
							
						
					
					
						commit
						22906f7fce
					
				
					 1 changed files with 7 additions and 6 deletions
				
			
		| 
						 | 
					@ -552,7 +552,7 @@ static void handle_view_destroyed(wlc_handle handle) {
 | 
				
			||||||
	if (view) {
 | 
						if (view) {
 | 
				
			||||||
		bool fullscreen = swayc_is_fullscreen(view);
 | 
							bool fullscreen = swayc_is_fullscreen(view);
 | 
				
			||||||
		remove_view_from_scratchpad(view);
 | 
							remove_view_from_scratchpad(view);
 | 
				
			||||||
		swayc_t *parent = destroy_view(view);
 | 
							swayc_t *parent = destroy_view(view), *iter = NULL;
 | 
				
			||||||
		if (parent) {
 | 
							if (parent) {
 | 
				
			||||||
			ipc_event_window(parent, "close");
 | 
								ipc_event_window(parent, "close");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -566,17 +566,18 @@ static void handle_view_destroyed(wlc_handle handle) {
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (fullscreen) {
 | 
								if (fullscreen) {
 | 
				
			||||||
				while (parent) {
 | 
									iter = parent;
 | 
				
			||||||
					if (parent->fullscreen) {
 | 
									while (iter) {
 | 
				
			||||||
						parent->fullscreen = NULL;
 | 
										if (iter->fullscreen) {
 | 
				
			||||||
 | 
											iter->fullscreen = NULL;
 | 
				
			||||||
						break;
 | 
											break;
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					parent = parent->parent;
 | 
										iter = iter->parent;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			arrange_windows(parent, -1, -1);
 | 
								arrange_windows(iter ? iter : parent, -1, -1);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		// Is it unmanaged?
 | 
							// Is it unmanaged?
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue