[sawfish] added fullscreen-xinerama window-matcher [Jeremy Hankins]



commit 52d70f03e2a894d352115ba40dbb8886ef14dfd2
Author: chrisb <zanghar freenet de>
Date:   Sat Jul 18 20:04:05 2009 +0200

    added fullscreen-xinerama window-matcher [Jeremy Hankins]

 ChangeLog                           |    3 +++
 lisp/sawfish/wm/ext/match-window.jl |    9 ++++++++-
 lisp/sawfish/wm/state/maximize.jl   |   21 ++++++++++++++-------
 man/news.texi                       |    2 +-
 4 files changed, 26 insertions(+), 9 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 422b015..b4441d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
 	* lisp/sawfish/gtk/widget.jl: 	- allow negative values in spinbuttons in sawfish-ui
 					- connect spinbuttons to value-changed signal (allows typing in the value manually)
 
+	* lisp/sawfish/wm/state/maximize.jl
+	* lisp/sawfish/wm/ext/match-window.jl: added fullscreen-xinerama window matcher [Jeremy Hankins]
+
 2009-07-15  Christopher Bratusek <zanghar freenet de>
 	* src/Makefile.in: add --tag=CC there necessary on some systems [Gentoo]
 
diff --git a/lisp/sawfish/wm/ext/match-window.jl b/lisp/sawfish/wm/ext/match-window.jl
index c68117b..4a7ea50 100644
--- a/lisp/sawfish/wm/ext/match-window.jl
+++ b/lisp/sawfish/wm/ext/match-window.jl
@@ -102,7 +102,8 @@
        (task-list-skip boolean)
        (never-iconify boolean)
        (never-maximize boolean)
-       (fullscreen boolean))
+       (fullscreen boolean)
+       (fullscreen-xinerama boolean))
       (other ,(_ "Other")
        (unique-name boolean)
        (auto-gravity boolean)
@@ -399,6 +400,12 @@
 	   (setq space (1+ space)))
 	     (set-window-workspaces w (list space))))))
 
+  (define-match-window-setter 'fullscreen-xinerama
+   (lambda (w prop value)
+     (declare (unused prop))
+     (when value
+       (window-put w 'queued-fullxinerama-maximize t))))
+
   (define-match-window-setter 'maximized
    (lambda (w prop value)
      (declare (unused prop))
diff --git a/lisp/sawfish/wm/state/maximize.jl b/lisp/sawfish/wm/state/maximize.jl
index 394abcf..8f660b3 100644
--- a/lisp/sawfish/wm/state/maximize.jl
+++ b/lisp/sawfish/wm/state/maximize.jl
@@ -554,19 +554,26 @@ unmaximized."
   (define (after-add-window w)
     (let ((vert (window-get w 'queued-vertical-maximize))
 	  (horiz (window-get w 'queued-horizontal-maximize))
-	  (full (window-get w 'queued-fullscreen-maximize)))
-      (when (or vert horiz full)
+	  (full (window-get w 'queued-fullscreen-maximize))
+          (fullxinerama (window-get w 'queued-fullxinerama-maximize)))
+      (when (or vert horiz full fullxinerama)
 	(when vert
 	  (window-put w 'queued-vertical-maximize nil))
 	(when horiz
 	  (window-put w 'queued-horizontal-maximize nil))
 	(when full
 	  (window-put w 'queued-fullscreen-maximize nil))
-	(if full
-	    (maximize-window-fullscreen w t)
-	  (maximize-window w (cond ((and vert horiz) nil)
-				   (vert 'vertical)
-				   (horiz 'horizontal)))))))
+        (when fullxinerama
+          (window-put w 'queued-fullxinerama-maximize nil))
+       (cond
+        (full
+         (maximize-window-fullscreen w t))
+        (fullxinerama
+         (maximize-window-fullxinerama w t))
+        (t
+          (maximize-window w (cond ((and vert horiz) nil)
+                                   (vert 'vertical)
+				   (horiz 'horizontal))))))))
 
   (add-hook 'after-add-window-hook after-add-window)
 
diff --git a/man/news.texi b/man/news.texi
index d3dc4ff..789c193 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -28,7 +28,7 @@ they occurred between. For more detailed information see the
 
 @item 5 new move-cursor command 4 for moving diagonally (move-cursor -northwest, -northeast, -southwest, -southeast), and move-cursor-center [Christopher Bratusek]
 
- item Added fullscreen and new-workspace matches [Jeremy Hankins]
+ item Added fullscreen, fullscreen-xinerama and new-workspace matches [Jeremy Hankins]
 
 @end itemize
 @item Other Changes:



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