mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Merge pull request #433 from crondog/issue431
Return focus to fullscreen view
This commit is contained in:
		
						commit
						5af4e747d3
					
				
					 2 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -1464,7 +1464,7 @@ static struct cmd_results *cmd_fullscreen(int argc, char **argv) {
 | 
				
			||||||
	wlc_view_set_state(container->handle, WLC_BIT_FULLSCREEN, !current);
 | 
						wlc_view_set_state(container->handle, WLC_BIT_FULLSCREEN, !current);
 | 
				
			||||||
	// Resize workspace if going from  fullscreen -> notfullscreen
 | 
						// Resize workspace if going from  fullscreen -> notfullscreen
 | 
				
			||||||
	// otherwise just resize container
 | 
						// otherwise just resize container
 | 
				
			||||||
	if (current) {
 | 
						if (!current) {
 | 
				
			||||||
		arrange_windows(workspace, -1, -1);
 | 
							arrange_windows(workspace, -1, -1);
 | 
				
			||||||
		workspace->fullscreen = container;
 | 
							workspace->fullscreen = container;
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -220,6 +220,10 @@ static bool handle_view_created(wlc_handle handle) {
 | 
				
			||||||
			// refocus in-between command lists
 | 
								// refocus in-between command lists
 | 
				
			||||||
			set_focused_container(newview);
 | 
								set_focused_container(newview);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							swayc_t *workspace = swayc_parent_by_type(focused, C_WORKSPACE);
 | 
				
			||||||
 | 
							if (workspace && workspace->fullscreen) {
 | 
				
			||||||
 | 
								set_focused_container(workspace->fullscreen);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		swayc_t *output = swayc_parent_by_type(focused, C_OUTPUT);
 | 
							swayc_t *output = swayc_parent_by_type(focused, C_OUTPUT);
 | 
				
			||||||
		wlc_handle *h = malloc(sizeof(wlc_handle));
 | 
							wlc_handle *h = malloc(sizeof(wlc_handle));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue