mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	Support xdg-toplevel-icon protocol
This patch also changes the semantics of scaled_icon_buffer: rather than calling scaled_icon_buffer_set_app_id() every time an app_id is set, we can now call scaled_icon_buffer_set_view() just once so that multiple scaled_icon_buffers bound to a window are automatically updated when an app_id is set or new icon is set via xdg-toplevel-icon-v1.
This commit is contained in:
		
							parent
							
								
									649773b4f8
								
							
						
					
					
						commit
						fb077c0095
					
				
					 12 changed files with 247 additions and 57 deletions
				
			
		| 
						 | 
				
			
			@ -199,9 +199,8 @@ item_create_scene_for_state(struct menuitem *item, float *text_color,
 | 
			
		|||
			scaled_icon_buffer_set_icon_name(icon_buffer, item->icon_name);
 | 
			
		||||
		} else if (show_app_icon) {
 | 
			
		||||
			/* app icon in client-list-combined-menu */
 | 
			
		||||
			const char *app_id = view_get_string_prop(
 | 
			
		||||
				item->client_list_view, "app_id");
 | 
			
		||||
			scaled_icon_buffer_set_app_id(icon_buffer, app_id);
 | 
			
		||||
			scaled_icon_buffer_set_view(icon_buffer,
 | 
			
		||||
				item->client_list_view);
 | 
			
		||||
		}
 | 
			
		||||
		wlr_scene_node_set_position(&icon_buffer->scene_buffer->node,
 | 
			
		||||
			theme->menu_items_padding_x, theme->menu_items_padding_y);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue