mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	fullscreen: partially working
This commit is contained in:
		
							parent
							
								
									2b1a0728b8
								
							
						
					
					
						commit
						b922e1cb29
					
				
					 1 changed files with 22 additions and 3 deletions
				
			
		| 
						 | 
					@ -41,11 +41,30 @@ void arrange_windows(swayc_t *container, int width, int height) {
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	case C_VIEW:
 | 
						case C_VIEW:
 | 
				
			||||||
		sway_log(L_DEBUG, "Setting view to %d x %d @ %d, %d", width, height, container->x, container->y);
 | 
					 | 
				
			||||||
		// If the view is fullscreen, we need to tell wlc to draw it as such
 | 
							// If the view is fullscreen, we need to tell wlc to draw it as such
 | 
				
			||||||
		if (wlc_view_get_state(container->handle) & WLC_BIT_FULLSCREEN > 0) {
 | 
							if (wlc_view_get_state(container->handle) & WLC_BIT_FULLSCREEN) {
 | 
				
			||||||
			sway_log(L_DEBUG, "window is fullscreen!");
 | 
								swayc_t *parent = container;
 | 
				
			||||||
 | 
								do {
 | 
				
			||||||
 | 
									parent = parent->parent;
 | 
				
			||||||
 | 
								} while(parent->type != C_OUTPUT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								sway_log(L_DEBUG, "res %d %d", parent->width, parent->height);
 | 
				
			||||||
 | 
								struct wlc_geometry geometry = {
 | 
				
			||||||
 | 
									.origin = {
 | 
				
			||||||
 | 
										.x = 0,
 | 
				
			||||||
 | 
										.y = 0
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									.size = {
 | 
				
			||||||
 | 
										.w = parent->width,
 | 
				
			||||||
 | 
										.h = parent->height
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								wlc_view_set_geometry(container->handle, &geometry);
 | 
				
			||||||
 | 
								return;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							sway_log(L_DEBUG, "Setting view to %d x %d @ %d, %d", width, height, container->x, container->y);
 | 
				
			||||||
		struct wlc_geometry geometry = {
 | 
							struct wlc_geometry geometry = {
 | 
				
			||||||
			.origin = {
 | 
								.origin = {
 | 
				
			||||||
				.x = container->x,
 | 
									.x = container->x,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue