action: support SendToDesktop 'follow' option

Make follow 'true' by default as per Openbox 3.6 specification.
Note: this is an interface change.

Fixes: issue #841
This commit is contained in:
Johan Malm 2023-03-26 10:57:53 +01:00 committed by Consolatis
parent bdf6e13881
commit 33b98b19aa
6 changed files with 67 additions and 17 deletions

View file

@ -664,15 +664,15 @@ init_windowmenu(struct server *server)
/* Workspace sub-menu */
struct menu *workspace_menu = menu_create(server, "workspaces", "");
current_item = item_create(workspace_menu, _("Move left"), false);
/*
* <action name="SendToDesktop"><follow> is true by default so
* GoToDesktop will be called as part of the action.
*/
fill_item("name.action", "SendToDesktop");
fill_item("to.action", "left");
fill_item("name.action", "GoToDesktop");
fill_item("to.action", "left");
current_item = item_create(workspace_menu, _("Move right"), false);
fill_item("name.action", "SendToDesktop");
fill_item("to.action", "right");
fill_item("name.action", "GoToDesktop");
fill_item("to.action", "right");
current_item = item_create(menu, _("Workspace"), true);
current_item->submenu = workspace_menu;