Sawfish
Advertisement
Browse all patches

Author[]

Nolan Leake

Synopsis[]

maximize-window honors maximize-raises, but maximize-window-fullscreen and maximize-window-fullxinerama don't. Almost certainly an oversight, and a trivial fix.

Patch testing[]

  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: ./autogen.sh && 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[]

--- maximize.jl.orig    2010-03-16 13:39:49.000000000 -0700
+++ maximize.jl 2010-03-16 13:49:49.000000000 -0700
@@ -492,17 +492,18 @@
     (cond ((and state (not (window-maximized-fullscreen-p w)))
           (when (window-maximizable-p w)
             (let ((head-offset (current-head-offset w)) (head-dims (current-hea
d-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 (car head-offset) (cdr head-offset)
                                      (car head-dims) (cdr head-dims))
-              (raise-window* w)
+              (when maximize-raises
+                (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))))))
 
@@ -522,17 +523,18 @@
     "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)
+              (when maximize-raises
+                (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))))))
 

Community's reasons for inclusion or rejection[]

  • Yes vote: yes. It seems only polite to respect the user's configuration choices. - Nolan
  • Yes vote: yes. commited Flashrider [Christopher Bratusek] 19:15, March 19, 2010 (UTC)

Patch submitters, please vote also! Yes, obviously 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., Try vote: let's try in experimental., Wtf vote: pondering. or Suspend wait for next release.
Advertisement