aboutsummaryrefslogtreecommitdiffstats
path: root/mousefunc.c
diff options
context:
space:
mode:
authorokan2011-05-07 17:15:37 +0000
committerokan2011-05-07 17:15:37 +0000
commitaab3606ea2265f01371140ee6d315679188062c4 (patch)
treea3d9ae2779a058d3d7ccfff93bd393fdc549edf2 /mousefunc.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 'mousefunc.c')
-rw-r--r--mousefunc.c8
1 files changed, 7 insertions, 1 deletions
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 <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;