[sawfish] never-delete window-matcher



commit 9c1b18da3ed773acd2114150a9e7de8d854a3b2d
Author: Christopher Roy Bratusek <zanghar freenet de>
Date:   Fri Sep 17 19:59:44 2010 +0200

    never-delete window-matcher

 ChangeLog                           |    5 +++++
 lisp/sawfish/wm/ext/match-window.jl |    1 +
 lisp/sawfish/wm/windows.jl          |    3 ++-
 3 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e0f214f..4279641 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,11 @@
 	the or-exec family. Turns windows into drop-down-terminal like
 	windows. Check the files description for more infos.
 
+	* lisp/sawfish/wm/ext/match-window.jl
+	* lisp/sawfish/wm/windows.jl: added `never-delete' window-matcher.
+	Window matched by this can't be deleted by the `delete-window-safely'
+	function, only by `delete-window' (which equals to `xkill').
+
 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/ext/match-window.jl b/lisp/sawfish/wm/ext/match-window.jl
index 5238265..3ddf269 100644
--- a/lisp/sawfish/wm/ext/match-window.jl
+++ b/lisp/sawfish/wm/ext/match-window.jl
@@ -98,6 +98,7 @@
 		 (shaded boolean)
 		 (never-iconify boolean)
 		 (never-maximize boolean)
+		 (never-delete boolean)
 		 )
      (other ,(_ "Other")
             (avoid boolean)
diff --git a/lisp/sawfish/wm/windows.jl b/lisp/sawfish/wm/windows.jl
index c3c172b..9145680 100644
--- a/lisp/sawfish/wm/windows.jl
+++ b/lisp/sawfish/wm/windows.jl
@@ -416,7 +416,8 @@ use. Otherwise (window-size-hints W) is used."
 
   (define (delete-window-safely w)
     "Delete the window, or beep if the window can't be closed safely."
-    (delete-window w t))
+    (if (not (window-get w 'never-delete))
+      (delete-window w t)))
 
   (define-command 'delete-window-safely delete-window-safely #:spec "%W")
 



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