diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2011-05-07 17:15:38 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2011-05-07 17:15:38 +0000 |
commit | 95d258d9c7697b206df906f645600bfaa885eeb8 (patch) | |
tree | f31f04f40a2ec67e9ec62d5ee47485390bcda654 /app/cwm/mousefunc.c | |
parent | d450be8250d819b897aa794573c814df1c9c9710 (diff) |
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 'app/cwm/mousefunc.c')
-rw-r--r-- | app/cwm/mousefunc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/cwm/mousefunc.c b/app/cwm/mousefunc.c index 9b55c6da0..2f9b8f62d 100644 --- a/app/cwm/mousefunc.c +++ b/app/cwm/mousefunc.c @@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: mousefunc.c,v 1.23 2011/05/05 19:52:52 okan Exp $ + * $Id: mousefunc.c,v 1.24 2011/05/07 17:15:37 okan Exp $ */ #include <sys/param.h> @@ -84,6 +84,9 @@ mousefunc_window_resize(struct client_ctx *cc, void *arg) struct screen_ctx *sc = cc->sc; int x = cc->geom.x, y = cc->geom.y; + if (cc->flags & CLIENT_FREEZE) + return; + client_raise(cc); client_ptrsave(cc); @@ -142,6 +145,9 @@ mousefunc_window_move(struct client_ctx *cc, void *arg) client_raise(cc); + if (cc->flags & CLIENT_FREEZE) + return; + if (xu_ptr_grab(cc->win, MouseMask, Cursor_move) < 0) return; |