Browse all patches

Author Edit

Jonathan Sambrook (Uploaded by Christopher Bratusek)

Synopsis Edit

A hacky patch for maximizing windows fullscreen in the xinerama

Patch testing Edit

  1. Copy/paste the patch listed below into some file, eg. TEST.diff.
  2. If you don't have sawfish sources yet, have one, as described get it from GIT repo.
  3. Go into the directory where sawfish sources reside, eg. cd sawfish
  4. Test if the patch applies cleanly with this command:
    patch -p1 --ignore-whitespace --dry-run < TEST.diff
    in case of problems try also: -p0 or -p2
  5. If it applies cleanly, then remove the --dry-run from above command and run it again, otherwise ask on the mailing list.
  6. Compile sawfish: ./ && make
  7. Install it for testing, but it depends on your linux distribution.
    1. It is always better to install sawfish as your distribution package, but it is different for each distribution.
    2. So you may try make install, which will install sawifish in /usr/local/share/sawfish/ (if you have write access). But then make sure that you run the correct version and delete it from that directory afterwards, to avoid any conflicts.
  8. Se also

PS: edit this template if you feel that those instructions can be improved.

Patch Edit

--- lisp/sawfish/wm/state/maximize.jl.orig	2003-07-29 20:44:45.000000000 +0100
+++ lisp/sawfish/wm/state/maximize.jl	2003-07-29 21:30:09.000000000 +0100
@@ -47,7 +47,9 @@
-	    maximize-window-fullscreen-toggle)
+	    maximize-window-fullscreen-toggle
+	    maximize-window-fullxinerama
+	    maximize-window-fullxinerama-toggle)
     (open rep
@@ -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

Community's reasons for inclusion or rejection Edit

Patch submitters, please vote also! Yes, obviosuly your vote will be positive, but it's the place to give your explanation why this patch is good for all Sawfish users, and why it is correct - good reasons for inclusion.

When voting anonymously please write your name, so that it can be associated with your posts on the mailing list. If you are logged in you can sign yourself by typing four tilda characters: ~~~~.

  • Please vote with: Yes vote: yes., No vote: no. or Wtf vote: pondering. or with Suspend wait for next release. if you propose the patch to wait for next release.
  • Yes vote: yes. Uploaders comment: applies cleanly. I'll test it, but I don't use Xinerama, but may be an improvement for users of it. You'll see. Flashrider [Christopher Bratusek] 21:17, 5 August 2008 (UTC)
  • Yes vote: yes. Before this patch I was doing maximize + growpack to grow onto the second head. Now I can use this patch and it works nicely on dualhead. Will it work on three or more heads? What About L-shaped dualheads? I think that answer to those questions will come later (after it's applied, and more people use it), and perhaps the code will be improved. Patch applied, thanks. Janek Kozicki 11:58, 29 August 2008 (UTC)

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.