mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	Address some more feedback
This commit is contained in:
		
							parent
							
								
									52fe2688ea
								
							
						
					
					
						commit
						a1d5d20914
					
				
					 2 changed files with 12 additions and 2 deletions
				
			
		| 
						 | 
					@ -138,6 +138,11 @@ static void arrange_layer(struct wlr_output *output, struct wl_list *list,
 | 
				
			||||||
		} else if ((state->anchor & ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM)) {
 | 
							} else if ((state->anchor & ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM)) {
 | 
				
			||||||
			box.y -= state->margin.bottom;
 | 
								box.y -= state->margin.bottom;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							if (box.width < 0 || box.height < 0) {
 | 
				
			||||||
 | 
								// TODO: Bubble up a protocol error?
 | 
				
			||||||
 | 
								wlr_layer_surface_close(layer);
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		// Apply
 | 
							// Apply
 | 
				
			||||||
		roots_surface->geo = box;
 | 
							roots_surface->geo = box;
 | 
				
			||||||
		apply_exclusive(usable_area, state->anchor, state->exclusive_zone,
 | 
							apply_exclusive(usable_area, state->anchor, state->exclusive_zone,
 | 
				
			||||||
| 
						 | 
					@ -177,6 +182,7 @@ static void arrange_layers(struct wlr_output *_output) {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Arrange non-exlusive surfaces from top->bottom
 | 
						// Arrange non-exlusive surfaces from top->bottom
 | 
				
			||||||
 | 
						usable_area.x = usable_area.y = 0;
 | 
				
			||||||
	wlr_output_effective_resolution(output->wlr_output,
 | 
						wlr_output_effective_resolution(output->wlr_output,
 | 
				
			||||||
			&usable_area.width, &usable_area.height);
 | 
								&usable_area.width, &usable_area.height);
 | 
				
			||||||
	arrange_layer(output->wlr_output,
 | 
						arrange_layer(output->wlr_output,
 | 
				
			||||||
| 
						 | 
					@ -313,6 +319,7 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) {
 | 
				
			||||||
	wl_signal_add(&layer_surface->events.map, &roots_surface->map);
 | 
						wl_signal_add(&layer_surface->events.map, &roots_surface->map);
 | 
				
			||||||
	roots_surface->unmap.notify = handle_unmap;
 | 
						roots_surface->unmap.notify = handle_unmap;
 | 
				
			||||||
	wl_signal_add(&layer_surface->events.unmap, &roots_surface->unmap);
 | 
						wl_signal_add(&layer_surface->events.unmap, &roots_surface->unmap);
 | 
				
			||||||
 | 
						// TODO: Listen for subsurfaces
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	roots_surface->layer_surface = layer_surface;
 | 
						roots_surface->layer_surface = layer_surface;
 | 
				
			||||||
	layer_surface->data = roots_surface;
 | 
						layer_surface->data = roots_surface;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -560,14 +560,15 @@ static void render_output(struct roots_output *output) {
 | 
				
			||||||
		wl_list_for_each_reverse(view, &desktop->views, link) {
 | 
							wl_list_for_each_reverse(view, &desktop->views, link) {
 | 
				
			||||||
			render_view(view, &data);
 | 
								render_view(view, &data);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							// Render top layer above shell views
 | 
				
			||||||
 | 
							render_layer(output, output_box, &data,
 | 
				
			||||||
 | 
									&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Render drag icons
 | 
						// Render drag icons
 | 
				
			||||||
	data.alpha = 1.0;
 | 
						data.alpha = 1.0;
 | 
				
			||||||
	drag_icons_for_each_surface(server->input, render_surface, &data);
 | 
						drag_icons_for_each_surface(server->input, render_surface, &data);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	render_layer(output, output_box, &data,
 | 
					 | 
				
			||||||
			&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]);
 | 
					 | 
				
			||||||
	render_layer(output, output_box, &data,
 | 
						render_layer(output, output_box, &data,
 | 
				
			||||||
			&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]);
 | 
								&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -670,6 +671,7 @@ void output_damage_whole_local_surface(struct roots_output *output,
 | 
				
			||||||
		output->desktop->layout, output->wlr_output);
 | 
							output->desktop->layout, output->wlr_output);
 | 
				
			||||||
	damage_whole_surface(surface, ox + layout->x, oy + layout->y,
 | 
						damage_whole_surface(surface, ox + layout->x, oy + layout->y,
 | 
				
			||||||
			rotation, output);
 | 
								rotation, output);
 | 
				
			||||||
 | 
						// TODO: subsurfaces
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void damage_whole_decoration(struct roots_view *view,
 | 
					static void damage_whole_decoration(struct roots_view *view,
 | 
				
			||||||
| 
						 | 
					@ -743,6 +745,7 @@ void output_damage_from_local_surface(struct roots_output *output,
 | 
				
			||||||
		output->desktop->layout, output->wlr_output);
 | 
							output->desktop->layout, output->wlr_output);
 | 
				
			||||||
	damage_from_surface(surface, ox + layout->x, oy + layout->y,
 | 
						damage_from_surface(surface, ox + layout->x, oy + layout->y,
 | 
				
			||||||
			rotation, output);
 | 
								rotation, output);
 | 
				
			||||||
 | 
						// TODO: Subsurfaces
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void output_damage_from_view(struct roots_output *output,
 | 
					void output_damage_from_view(struct roots_output *output,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue