mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	client list combined menu fix
We don't know if the client-list-combined-menu is standalone ie. triggered by a keybind or a submenu of another menu. So we update client-list-combined-menu every time ShowMenu is called.
This commit is contained in:
		
							parent
							
								
									71b2b5a4bc
								
							
						
					
					
						commit
						d26b868dbe
					
				
					 1 changed files with 9 additions and 4 deletions
				
			
		
							
								
								
									
										11
									
								
								src/action.c
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								src/action.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -665,10 +665,15 @@ show_menu(struct server *server, struct view *view,
 | 
			
		|||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/* Need to refresh to show current windows and recalculate width */
 | 
			
		||||
	if (!strcasecmp(menu_name, "client-list-combined-menu")) {
 | 
			
		||||
	/*
 | 
			
		||||
	 *  We always refresh the client-list-combined-menu so that it is
 | 
			
		||||
	 *  up-to-date whether it is used as a menu with `menu_name` set to
 | 
			
		||||
	 *  `client-list-combined-menu` *  or used as a submenu
 | 
			
		||||
	 *  which we don't know at this point. It is also needed to calculate
 | 
			
		||||
	 *  the proper width for placemeent, as it fluctuates depending
 | 
			
		||||
	 *  on the length of the title.
 | 
			
		||||
	 */
 | 
			
		||||
	update_client_list_combined_menu(menu->server);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	int x = server->seat.cursor->x;
 | 
			
		||||
	int y = server->seat.cursor->y;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue