Created attachment 2972[details]
clint-list-combined-menu with submenus
Problem:
Client-menu allows to close or move a window to another desktop, but only one (active) window. Client-list-menu and client-list-combined-menu gives an overview of the windows of all desktops, but does not allow to manage windows. And openbox has not a global windows rearranging tool.
Solution:
The proposed patch adds this functionality to the client-list-menu and client-list-combined-menu. I propose to interpret each client item of these menus not as a normal item with predefined action ('Activate'), but as a submenu with three actions: 'Send to desktop' (submenu), 'Activate' and 'Close'. (It is possible to add to the actions list some other actions of the client-menu, but I do not see them make sense in this case.)
The new behavior of these menus is backward compatible with old behavior. That is the old mouse or keyboard actions will give the same results as before. This is achieved by using a new type of submenu - submenu with the default item (see bug 4795). 'Activate' is the default item of an each client submenu, so the left click or the Enter key in the client list activates this client window. To perform new actions, you should enter the client submenu (right click or Right key, or autoopen) and select the appropriate item. This possibility fits well with the (undocumented) ability to perform the menu actions without closing the menu by hold down Ctrl key. Menu is automatically updated in accordance with the results of actions.
Some technical details:
Client-list-menu.c and client-list-combined-menu.c had many similarities, and after adding the new functionality in both the menu of common code became too much. Therefore, the common code has been isolated in a subroutines, a module client-list-combined-menu.c was deleted and the implementation of client-list-combined-menu has been moved to client-list-menu.c.
Patch is based on Dana's Master branch 3.5.0 (http://git.icculus.org/?p=dana/openbox.git;a=snapshot;h=98b02c6b60bbde2a5db026b3ee3e6e6dc44d1a92) and depends on the patch from the bug 4795 (http://bugzilla.icculus.org/show_bug.cgi?id=4795).
To do:
Translate the new language string "_Activate". This patch contains only 2 tranlations: Russian and Ukrainian.
Created attachment 3524 [details] clm_w_sub6.patch adapted to the current state of the "master" branch