[sawfish] Tabbed Windowing Support: Raise Tabs on hover



commit 739f9a9c816efbed3c5edc1dc073679db5d467d7
Author: chrisb <zanghar freenet de>
Date:   Thu May 7 21:04:21 2009 +0200

    Tabbed Windowing Support: Raise Tabs on hover
---
 ChangeLog                   |    2 ++
 lisp/sawfish/wm/tabs/tab.jl |   14 ++++++++++++--
 man/news.texi               |    4 +++-
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c24fa2f..0bd361c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@
 
 	* lisp/sawfish/wm/autoload.jl: autoload Tabs-group
 
+	* lisp/sawfish/wm/tabs/tab.jl: Tabbed Windowing Support: Raise Tabs on hover
+
 2009-05-06  Christopher Bratusek <zanghar freenet de>
 	* sawfish.spec.in: don't re-define %{_host} [Ritz]
 
diff --git a/lisp/sawfish/wm/tabs/tab.jl b/lisp/sawfish/wm/tabs/tab.jl
index 52651e3..570ede0 100644
--- a/lisp/sawfish/wm/tabs/tab.jl
+++ b/lisp/sawfish/wm/tabs/tab.jl
@@ -33,7 +33,8 @@
 	      sawfish.wm.frames
 	      sawfish.wm.tabs.tabgroup
 	      sawfish.wm.util.marks
-	      sawfish.wm.windows)
+	      sawfish.wm.windows
+	      sawfish.wm.stacking)
 
      (define-structure-alias tab sawfish.wm.tabs.tab)
 
@@ -63,6 +64,11 @@
     :group tabs
     :type number)
 
+  (defcustom tab-raise-on-hover nil 
+    "Raise Tabs on Hover"
+    :group tabs
+    :type boolean)
+
   (define (get-tab-pos win)
     (let* ((group (tab-find-window win))
        	   (tabnum (tab-rank win (tab-group-window-list group))))
@@ -129,7 +135,11 @@
           (unmark-all-windows))
       (mark-window win)))
 
-  (define-command 'add-to-group mygroup #:spec "%W"))
+  (define-command 'add-to-group mygroup #:spec "%W")
+
+  (if (eq tab-raise-on-hover 't)
+    (add-hook 'enter-frame-part-hook
+      (lambda (win) (raise-window win)))))
 
   ;(require 'x-cycle)
   ;(define-cycle-command-pair
diff --git a/man/news.texi b/man/news.texi
index 36c6852..7de7e32 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -75,6 +75,8 @@ To use the old style, put @code{(define-special-variable customize-program "sawf
 
 @item Tabbed Windowing Support [Yann Hodique, Scott Scriven, Nathan Froyd, Christopher Bratusek]
 
+ item Tabbed Windowing Support: Raise Tabs on hover [Christopher Bratusek]
+
 @item Warp cursor to cycled windows, if warp-cursor is enabled [Christopher Bratusek]
 
 @item Warp cursor to unmaximied windows, if warp-cursor is enabled [Fernando Carmona Varo]
@@ -89,7 +91,7 @@ To use the old style, put @code{(define-special-variable customize-program "sawf
 
 @item Make Window History appear in Sawfish-UI [Christopher Bratusek]
 
- item Added cycle-among-groups{,-backwards} commands (cycle between the most recently used window of groups) [Fernando Carmano Varo]
+ item Added cycle-among-groups(,-backwards) commands (cycle between the most recently used window of groups) [Fernando Carmano Varo]
 @end itemize
 
 @item Other changes:



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