mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	src/action.c: fix client-send-to-menu not properly updated (#2246)
Before this commit, client-menu needed to be opened for client-send-to-menu to be updated.
This commit is contained in:
		
							parent
							
								
									bb87ca5493
								
							
						
					
					
						commit
						c6a6be8219
					
				
					 1 changed files with 8 additions and 11 deletions
				
			
		
							
								
								
									
										19
									
								
								src/action.c
									
										
									
									
									
								
							
							
						
						
									
										19
									
								
								src/action.c
									
										
									
									
									
								
							| 
						 | 
					@ -646,25 +646,22 @@ show_menu(struct server *server, struct view *view, struct cursor_context *ctx,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 *  We always refresh the client-list-combined-menu so that it is
 | 
						 * We always refresh client-list-combined-menu and client-send-to-menu
 | 
				
			||||||
	 *  up-to-date whether it is used as a menu with `menu_name` set to
 | 
						 * so that they are up-to-date whether they are directly opened as a
 | 
				
			||||||
	 *  `client-list-combined-menu` *  or used as a submenu
 | 
						 * top-level menu or opened as a submenu which we don't know at this
 | 
				
			||||||
	 *  which we don't know at this point. It is also needed to calculate
 | 
						 * point. It is also needed to calculate the proper width for placement
 | 
				
			||||||
	 *  the proper width for placemeent, as it fluctuates depending
 | 
						 * as it fluctuates depending on application/workspace titles.
 | 
				
			||||||
	 *  on the length of the title.
 | 
					 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	update_client_list_combined_menu(menu->server);
 | 
						update_client_list_combined_menu(menu->server);
 | 
				
			||||||
 | 
						update_client_send_to_menu(menu->server);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	int x = server->seat.cursor->x;
 | 
						int x = server->seat.cursor->x;
 | 
				
			||||||
	int y = server->seat.cursor->y;
 | 
						int y = server->seat.cursor->y;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* The client menu needs an active client */
 | 
						/* The client menu needs an active client */
 | 
				
			||||||
	bool is_client_menu = !strcasecmp(menu_name, "client-menu");
 | 
						bool is_client_menu = !strcasecmp(menu_name, "client-menu");
 | 
				
			||||||
	if (is_client_menu) {
 | 
						if (is_client_menu && !view) {
 | 
				
			||||||
		if (!view) {
 | 
							return;
 | 
				
			||||||
			return;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		update_client_send_to_menu(menu->server);
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	/* Place menu in the view corner if desired (and menu is not root-menu) */
 | 
						/* Place menu in the view corner if desired (and menu is not root-menu) */
 | 
				
			||||||
	if (!at_cursor && view) {
 | 
						if (!at_cursor && view) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue