mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	Fix window picking order
This commit is contained in:
		
							parent
							
								
									f252d6a98e
								
							
						
					
					
						commit
						747638b46b
					
				
					 2 changed files with 8 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -335,7 +335,7 @@ wlsc_surface_raise(struct wlsc_surface *surface)
 | 
			
		|||
	struct wlsc_compositor *compositor = surface->compositor;
 | 
			
		||||
 | 
			
		||||
	wl_list_remove(&surface->link);
 | 
			
		||||
	wl_list_insert(compositor->surface_list.prev, &surface->link);
 | 
			
		||||
	wl_list_insert(&compositor->surface_list, &surface->link);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
| 
						 | 
				
			
			@ -344,7 +344,7 @@ wlsc_surface_lower(struct wlsc_surface *surface)
 | 
			
		|||
	struct wlsc_compositor *compositor = surface->compositor;
 | 
			
		||||
 | 
			
		||||
	wl_list_remove(&surface->link);
 | 
			
		||||
	wl_list_insert(&compositor->surface_list, &surface->link);
 | 
			
		||||
	wl_list_insert(compositor->surface_list.prev, &surface->link);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
| 
						 | 
				
			
			@ -372,7 +372,7 @@ wlsc_output_repaint(struct wlsc_output *output)
 | 
			
		|||
	else
 | 
			
		||||
		glClear(GL_COLOR_BUFFER_BIT);
 | 
			
		||||
 | 
			
		||||
	wl_list_for_each(es, &ec->surface_list, link)
 | 
			
		||||
	wl_list_for_each_reverse(es, &ec->surface_list, link)
 | 
			
		||||
		wlsc_surface_draw(es, output);
 | 
			
		||||
 | 
			
		||||
	if (ec->focus)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -98,6 +98,11 @@ int wl_list_empty(struct wl_list *list);
 | 
			
		|||
	     &pos->member != (head);					\
 | 
			
		||||
	     pos = __container_of(pos->member.next, pos, member))
 | 
			
		||||
 | 
			
		||||
#define wl_list_for_each_reverse(pos, head, member)			\
 | 
			
		||||
	for (pos = __container_of((head)->prev, pos, member);		\
 | 
			
		||||
	     &pos->member != (head);					\
 | 
			
		||||
	     pos = __container_of(pos->member.prev, pos, member))
 | 
			
		||||
 | 
			
		||||
struct wl_array {
 | 
			
		||||
	uint32_t size;
 | 
			
		||||
	uint32_t alloc;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue