From aab3606ea2265f01371140ee6d315679188062c4 Mon Sep 17 00:00:00 2001 From: okan Date: Sat, 7 May 2011 17:15:37 +0000 Subject: 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@ --- mousefunc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mousefunc.c') diff --git a/mousefunc.c b/mousefunc.c index 9b55c6d..2f9b8f6 100644 --- a/mousefunc.c +++ b/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 @@ -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; -- cgit v1.2.3-2-gb3c3