[sawfish] fixed-size window-matcher



commit ad5a5b869b7c8e26f1aa03d6237bf6a2452757ca
Author: Christopher Roy Bratusek <zanghar freenet de>
Date:   Fri Sep 17 20:10:17 2010 +0200

    fixed-size window-matcher

 ChangeLog                               |    5 +++++
 lisp/sawfish/wm/commands/move-resize.jl |    9 ++++++---
 lisp/sawfish/wm/ext/match-window.jl     |    3 ++-
 3 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4279641..07863a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,11 @@
 	Window matched by this can't be deleted by the `delete-window-safely'
 	function, only by `delete-window' (which equals to `xkill').
 
+	* lisp/sawfish/wm/ext/match-window.jl
+	* lisp/sawfish/wm/commands/move-resize.jl: added `fixed-size' window-matcher.
+	Window matched by this can't be resized by the `resize-window-interactively',
+	`halve-window-size' or `double-window-size' functions, but by maximize-*.
+
 2010-09-16  Teika kazura <teika lavabit com>
 	* lisp/sawfish/wm/commands/grow-pack.jl
 	* lisp/sawfish/wm/ext/window-history.jl
diff --git a/lisp/sawfish/wm/commands/move-resize.jl b/lisp/sawfish/wm/commands/move-resize.jl
index 5d8b51c..912dba6 100644
--- a/lisp/sawfish/wm/commands/move-resize.jl
+++ b/lisp/sawfish/wm/commands/move-resize.jl
@@ -527,10 +527,12 @@ its edges with an edge of another window.")
       (resize-window-with-hints* win new-wid new-hgt)))
 
   (define (double-window-size w)
-    (resize-by-factor w 2))
+    (if (not (window-get w 'fixed-size))
+      (resize-by-factor w 2)))
 
   (define (halve-window-size w)
-    (resize-by-factor w 0.5))
+    (if (not (window-get w 'fixed-size))
+      (resize-by-factor w 0.5)))
 
 ;;; hook functions
 
@@ -549,7 +551,8 @@ its edges with an edge of another window.")
 
   (define (resize-window-interactively w)
     "Resize the window interactively, with mouse or keyboard."
-    (do-move-resize w 'resize))
+    (if (not (window-get w 'fixed-size))
+      (do-move-resize w 'resize)))
 
   (define (move-selected-window)
     "Wait for the user to select a window, then interactively move
diff --git a/lisp/sawfish/wm/ext/match-window.jl b/lisp/sawfish/wm/ext/match-window.jl
index 3ddf269..2fa9421 100644
--- a/lisp/sawfish/wm/ext/match-window.jl
+++ b/lisp/sawfish/wm/ext/match-window.jl
@@ -98,7 +98,6 @@
 		 (shaded boolean)
 		 (never-iconify boolean)
 		 (never-maximize boolean)
-		 (never-delete boolean)
 		 )
      (other ,(_ "Other")
             (avoid boolean)
@@ -115,6 +114,8 @@
             (transients-above (choice all parents none))
             (ignore-stacking-requests boolean)
 	    (auto-gravity boolean)
+	    (never-delete boolean)
+	    (fixed-size boolean)
 	    )))
 
   ;; alist of (PROPERTY . FEATURE) mapping properties to the lisp



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]