mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
introduce a new 'freeze' flag (CMS-f by default) which may be applied to
any window, after which all move/resize requests will be ignored, essentially freezing the window in place. there's a possibility to merge this with the 'ignore' concept, pending on how ignore+freeze should behave (really more ewmh stuff), but punting for now since ponies are on the line. requested and tested by thib at k2k11 with ponies, unicorns and rainbows. 'save the unicorns' todd@, ok oga@
This commit is contained in:
18
client.c
18
client.c
@ -264,6 +264,15 @@ client_current(void)
|
||||
return (_curcc);
|
||||
}
|
||||
|
||||
void
|
||||
client_freeze(struct client_ctx *cc)
|
||||
{
|
||||
if (cc->flags & CLIENT_FREEZE)
|
||||
cc->flags &= ~CLIENT_FREEZE;
|
||||
else
|
||||
cc->flags |= CLIENT_FREEZE;
|
||||
}
|
||||
|
||||
void
|
||||
client_maximize(struct client_ctx *cc)
|
||||
{
|
||||
@ -271,6 +280,9 @@ client_maximize(struct client_ctx *cc)
|
||||
int xmax = sc->xmax, ymax = sc->ymax;
|
||||
int x_org = 0, y_org = 0;
|
||||
|
||||
if (cc->flags & CLIENT_FREEZE)
|
||||
return;
|
||||
|
||||
if (cc->flags & CLIENT_MAXIMIZED) {
|
||||
cc->geom = cc->savegeom;
|
||||
} else {
|
||||
@ -310,6 +322,9 @@ client_vertmaximize(struct client_ctx *cc)
|
||||
struct screen_ctx *sc = cc->sc;
|
||||
int y_org = 0, ymax = sc->ymax;
|
||||
|
||||
if (cc->flags & CLIENT_FREEZE)
|
||||
return;
|
||||
|
||||
if (cc->flags & CLIENT_VMAXIMIZED) {
|
||||
cc->geom = cc->savegeom;
|
||||
} else {
|
||||
@ -341,6 +356,9 @@ client_horizmaximize(struct client_ctx *cc)
|
||||
struct screen_ctx *sc = cc->sc;
|
||||
int x_org = 0, xmax = sc->xmax;
|
||||
|
||||
if (cc->flags & CLIENT_FREEZE)
|
||||
return;
|
||||
|
||||
if (cc->flags & CLIENT_HMAXIMIZED) {
|
||||
cc->geom = cc->savegeom;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user