aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorokan2011-05-07 17:15:37 +0000
committerokan2011-05-07 17:15:37 +0000
commitaab3606ea2265f01371140ee6d315679188062c4 (patch)
treea3d9ae2779a058d3d7ccfff93bd393fdc549edf2 /client.c
parent0c012f4b4d6a4c203267367da87271b835b83547 (diff)
downloadcwm-aab3606ea2265f01371140ee6d315679188062c4.tar.gz
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@
Diffstat (limited to 'client.c')
-rw-r--r--client.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/client.c b/client.c
index ff2df5c..d52eab9 100644
--- a/client.c
+++ b/client.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: client.c,v 1.80 2011/03/22 10:56:08 okan Exp $
+ * $Id: client.c,v 1.81 2011/05/07 17:15:37 okan Exp $
*/
#include <sys/param.h>
@@ -265,12 +265,24 @@ client_current(void)
}
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)
{
struct screen_ctx *sc = cc->sc;
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 {