mirror of
https://github.com/amiwm/amiwm.git
synced 2026-04-14 11:04:18 +00:00
[amiwm] add a new command action to rotate windows
This adds a command to iterate over the set of windows. It's not like alt-tab in ye olde windows world where you'd alt tab once to switch between two windows, and then keep alt-tab'ing with alt down to go through the window list. For now it just literally iterates through those windows. This makes it a lot easier to work with a large number of open windows without having to constantly use the mouse.
This commit is contained in:
17
module.c
17
module.c
@@ -335,6 +335,9 @@ void mod_menuselect(struct module *m, int menu, int item, int subitem)
|
||||
menu, item, subitem, (int)m->pid);
|
||||
}
|
||||
|
||||
extern void lowertopmostclient(Scrn *scr);
|
||||
extern void raisebottommostclient(Scrn *scr);
|
||||
|
||||
static void handle_module_cmd(struct module *m, char *data, int data_len)
|
||||
{
|
||||
extern Scrn *getscreen(Window);
|
||||
@@ -369,6 +372,20 @@ static void handle_module_cmd(struct module *m, char *data, int data_len)
|
||||
screentoback();
|
||||
reply_module(m, NULL, 0);
|
||||
break;
|
||||
case MCMD_ROTATE_WINDOW_RAISE:
|
||||
/* Get the current screen */
|
||||
scr = getscreen(id);
|
||||
/* raise away! */
|
||||
raisebottommostclient(scr);
|
||||
reply_module(m, NULL, 0);
|
||||
break;
|
||||
case MCMD_ROTATE_WINDOW_LOWER:
|
||||
/* Get the current screen */
|
||||
scr = getscreen(id);
|
||||
/* lower away! */
|
||||
lowertopmostclient(scr);
|
||||
reply_module(m, NULL, 0);
|
||||
break;
|
||||
case MCMD_ADD_KEYGRAB:
|
||||
if(data_len>=sizeof(int[2])) {
|
||||
int res=create_keygrab(m, ((int*)data)[0], ((int*)data)[1]);
|
||||
|
||||
Reference in New Issue
Block a user