[sawfish] basic support for xinerama in Grow/Pack
- From: Christopher Bratusek <chrisb src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [sawfish] basic support for xinerama in Grow/Pack
- Date: Sat, 14 Nov 2009 14:34:16 +0000 (UTC)
commit fcca4ea346d6577c3fda66192cf73e089f17bfca
Author: Christopher Roy Bratusek <chris nanolx org>
Date: Sat Nov 14 15:33:36 2009 +0100
basic support for xinerama in Grow/Pack
ChangeLog | 5 +++++
lisp/sawfish/wm/commands/grow-pack.jl | 26 ++++++++++++++++++++++++--
man/news.texi | 11 ++++++++++-
3 files changed, 39 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b919e10..8417e64 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,11 @@
but it reduces the failure-rate by 95% which is the reason why it is integrated
while not beeing final. [Janek Kozicki]
+ * lisp/sawfish/wm/commands/grow-pack.jl: Make grow/pack Xinerama aware. Old implementations supported only 1
+ Head, current does 3, but needs to be extended to support atleast 4.
+ Also shrink-yank needs to be improved, but since Xinerama was previously
+ not supported this patch was still applied [Nolan Leake]
+
2009-11-14 Teika kazura <teika lavabit com>
* sawfish-client.jl: won't say "bye" at exit. The greeting "bye" annoys if you use emacs' sawfish-mode, so drop it.
diff --git a/lisp/sawfish/wm/commands/grow-pack.jl b/lisp/sawfish/wm/commands/grow-pack.jl
index 879fc61..f5399c9 100644
--- a/lisp/sawfish/wm/commands/grow-pack.jl
+++ b/lisp/sawfish/wm/commands/grow-pack.jl
@@ -159,10 +159,28 @@ See `pack-window-up'."
;; Implementation part.
+ (define (bump-get-head w direction)
+ (let* ((frame-dims (window-frame-dimensions w))
+ (frame-pos (window-position w))
+ (head1 (current-head w))
+ (head2 (find-head
+ (case direction
+ ((left) (- (car frame-pos) 1))
+ ((right) (+ (car frame-pos) (car frame-dims)))
+ (t (car frame-pos)))
+ (case direction
+ ((up) (- (cdr frame-pos) 1))
+ ((down) (+ (cdr frame-pos) (cdr frame-dims)))
+ (t (cdr frame-pos))))))
+ (if head2 head2 head1)))
+
(define (bump-distance w direction maximize min-dist)
(let* ((a (window-position w))
(z (window-frame-dimensions w))
(depth (window-get w 'depth))
+ (head (bump-get-head w direction))
+ (head-dims (head-dimensions head))
+ (head-offs (head-offset head))
bump cmp
xa xz
min-next border xborders)
@@ -175,7 +193,9 @@ See `pack-window-up'."
,(y xa) . ,(+ (y xa) (y xz))))
a (y a)
z (+ a (y z))
- bump 0
+ bump (if (eq direction 'up)
+ (cdr head-offs)
+ (car head-offs))
cmp <=)
(setq border (+ (x a) (x z))
min-next (+ border min-dist)
@@ -183,7 +203,9 @@ See `pack-window-up'."
,(y xa) . ,(+ (y xa) (y xz))))
a (y a)
z (+ a (y z))
- bump ((if (eq direction 'down) screen-height screen-width))
+ bump (if (eq direction 'down)
+ (+ (cdr head-offs) (cdr head-dims))
+ (+ (car head-offs) (car head-dims)))
cmp >=)))
(if (cmp bump min-next)
(mapc
diff --git a/man/news.texi b/man/news.texi
index 14d3f79..1de4c4e 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -83,13 +83,22 @@ collection with @code{rep_PUSHGC} / @code{rep_POPGC}. It also prevents
@code{add_window_hook} from being called with uninitialised argument.
[Timo Korvola, Janek Kozicki]
- item When a window sends request_code 12 (X_ConfigureWindow), don't auto-asumme
+ item error_handler() Vs Xinerama and X_ConfigureWindow
+
+When a window sends request_code 12 (X_ConfigureWindow), don't auto-asumme
it to be unmapped, as this may let several windows disappear at once randomly
not just the one that sent the request, this bug appears mostly in Xinerama
setups, but is not limited to it. The change is not 100% failsafe at the moment
but it reduces the failure-rate by 95% which is the reason why it is integrated
while not beeing final. [Janek Kozicki]
+ item Basic Xinerama support for Grow/Pack
+
+Make grow/pack Xinerama aware. Old implementations supported only 1
+Head, current does 3, but needs to be extended to support atleast 4.
+Also shrink-yank needs to be improved, but since Xinerama was previously
+not supported this patch was still applied [Nolan Leake]
+
@item Build and Installation:
@itemize +
@item Library check: Fix in @code{SMlib} and @code{libICE} check on x11r7 [Christopher Bratusek]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]