Xinerama fullscreen patch
- From: Jonathan Sambrook <sawfish hmmn org>
- To: sawfish-list gnome org
- Subject: Xinerama fullscreen patch
- Date: Tue, 29 Jul 2003 22:54:59 +0100
Hi,
Attached (ahem) is a patch to /usr/share/sawfish/1.3/lisp/maximize.jl (at least
that's the path on Debian) to add, in a hacky way - mea maxima culpa,
maximize fullscreen across Xinerama screens.
Why do think it's hacky? Cos it should (but doesn't) share most of its
code with the original maximize-window-fullscreen function it was ripped
off from.
So why don't I do that? My Lisp was never that great (I got by in
AutoCAD for v. simple tasks, six years ago) and has only deteriorated.
Why haven't I coded up ordinary-maximize-xinerama? I looked at it and,
well, see previous answer.
Still, it does what I want (spreads Dia out so I can see more).
Eeep eep,
Jonathan
--
.__
|..|__ _____ _____ ___ ____ _ ____
|;;|: \ /;:;:;\ /;:;:;\ /;:;\ /;;;;\/;\/\/;;;;\
| Y \ Y Y \ Y Y \ Y \ | ___ \ |\_| ___ \
|___| /__|_| /__|_| /__| / o \_____/ | \___ /
\/ \/ \/ \/ \/ _/ /
\__/
hmmnsoft's FreeShade : window shading, for Windows, for free
http://www.hmmn.org/FreeShade
--- maximize.jl.orig 2003-07-29 20:44:45.000000000 +0100
+++ maximize.jl 2003-07-29 21:30:09.000000000 +0100
@@ -47,7 +47,9 @@
maximize-fill-window-vertically-toggle
maximize-fill-window-horizontally-toggle
maximize-window-fullscreen
- maximize-window-fullscreen-toggle)
+ maximize-window-fullscreen-toggle
+ maximize-window-fullxinerama
+ maximize-window-fullxinerama-toggle)
(open rep
rep.system
@@ -494,10 +496,10 @@
;; fullscreen commands
(define (maximize-window-fullscreen w state)
+ "Fullscreen maximize the window."
(cond ((and state (not (window-maximized-fullscreen-p w)))
(when (window-maximizable-p w)
- (let ((head-offset (current-head-offset w))
- (head-dims (current-head-dimensions w)))
+ (let ((head-offset (current-head-offset w)) (head-dims (current-head-dimensions w)))
(save-unmaximized-geometry w)
(window-put w 'unmaximized-type (window-type w))
(push-window-type w 'unframed 'sawfish.wm.state.maximize)
@@ -516,6 +518,7 @@
(unmaximize-window w 'fullscreen))))
(define (maximize-window-fullscreen-toggle w)
+ "Toggle the state of the window between fullscreen maximized and unmaximized."
(maximize-window-fullscreen w (not (window-maximized-fullscreen-p w))))
(define-command 'maximize-window-fullscreen
@@ -523,6 +526,36 @@
(define-command 'maximize-window-fullscreen-toggle
maximize-window-fullscreen-toggle #:spec "%W")
+ (define (maximize-window-fullxinerama w state)
+ "Fullscreen maximize the window across all Xinerama screens."
+ (cond ((and state (not (window-maximized-fullscreen-p w)))
+ (when (window-maximizable-p w)
+ ( let ((screen-dims (screen-dimensions w)))
+ (save-unmaximized-geometry w)
+ (window-put w 'unmaximized-type (window-type w))
+ (push-window-type w 'unframed 'sawfish.wm.state.maximize)
+ (move-resize-window-to w 0 0 (car screen-dims) (cdr screen-dims))
+ (raise-window* w)
+ (window-put w 'maximized-fullscreen t)
+ (window-put w 'maximized-vertically t)
+ (window-put w 'maximized-horizontally t)
+ (call-window-hook 'window-maximized-hook
+ w (list 'fullscreen))
+ (call-window-hook 'window-state-change-hook
+ w (list '(maximized))))))
+
+ ((and (not state) (window-maximized-fullscreen-p w))
+ (unmaximize-window w 'fullscreen))))
+
+ (define (maximize-window-fullxinerama-toggle w)
+ "Toggle the state of the window between fullscreen maximized across all Xinerama and unmaximized."
+ (maximize-window-fullxinerama w (not (window-maximized-fullscreen-p w))))
+
+ (define-command 'maximize-window-fullxinerama
+ maximize-window-fullxinerama #:spec "%W")
+ (define-command 'maximize-window-fullxinerama-toggle
+ maximize-window-fullxinerama-toggle #:spec "%W")
+
;;; initialisation
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]