client send to menu

Shows all workspaces that current view can be sent to.
Works best when added to Client menu.

<menu id="client-send-to-menu" label="Send to..." />

Menu uses ">" and "<"  to highlight the current workspace
This commit is contained in:
Droc 2024-09-18 19:01:28 -05:00 committed by Johan Malm
parent 4f11dad45b
commit 4a1375c701
6 changed files with 68 additions and 7 deletions

View file

@ -680,10 +680,12 @@ show_menu(struct server *server, struct view *view,
/* The client menu needs an active client */
bool is_client_menu = !strcasecmp(menu_name, "client-menu");
if (!view && is_client_menu) {
return;
if (is_client_menu) {
if (!view) {
return;
}
update_client_send_to_menu(menu->server);
}
/* Place menu in the view corner if desired (and menu is not root-menu) */
if (!at_cursor && view) {
/* push the client menu underneath the window menu button */