[amiwm] Implement a keyboard shortcut to move a client to a different screen

This allows a keyboard shortcut to move a client to a different amiwm
screen.  That way when you have things like Firefox restart every window
in a single screen, you can quickly move screens to where they should be.
This commit is contained in:
Adrian Chadd
2022-05-26 18:54:13 -07:00
parent c0450d83bc
commit 631176c9a2
9 changed files with 45 additions and 1 deletions

View File

@@ -379,3 +379,18 @@ void flushclients()
rmclient(c);
}
}
/*
* Reparent the given client to the given screen.
*
* This moves the given client to the given screen.
*/
void
reparent_client(Scrn *s, Client *client)
{
client->scr = s;
if(client->parent != client->scr->root)
XReparentWindow(dpy, client->parent, s->back, client->x, client->y);
setstringprop(client->window, amiwm_screen, s->deftitle);
sendconfig(client);
}