Patch to remember window properties if you change the workspace

fuchur <[email protected]>
Newsgroups gmane.comp.window-managers.sawfish
Organization W.W
Message-ID <[email protected]>
Hi,

If you e.g have a sticky window and you maximized-vertically the window
sawfish set unmaximized-geometry (and other properties) to wrong
values if you change the workspace. You can test it:

Open a window and make it sticky. maximized-vertically the window. Open
sawfish-client and "check" the window with: 
"(window-get (select-window) 'swapped)"
go to the next workspace and again:
(window-get (select-window) 'swapped)
go to the next workspace and again:
(window-get (select-window) 'swapped)
and also go back to the workspaces and check again.

We have by all workspace wrong values by "maximized-horizontally" and
"unmaximized-geometry" but not on the first workspace where we have set
the window sticky.

I also read the comments in workspace.jl. The comment before
"(define (swap-out w space)" and in 
"(define (window-add-to-workspace w space)" and also if i read the code
tells me that we should only call "swap-in" in:
"(define (select-workspace* space #!key dont-focus inner-thunk force)"
if we have a copy of the window on a other workspace and not by a
"single window".

I am not sure but i can't believe that that is a features, for me that
is a bug. Please test the patch. Comments welcome.

-- 
Regards,
Fuchur

GPG Fingerprint: CA3B 8204 5B3E 6D48 6D53  C116 E5BC 70D5 B8D7 B2B0
remember-properties-workspace.patch (text/x-patch, 1014 B)
--- sawfish/lisp/sawfish/wm/workspace.jl.orig	2013-01-26 17:26:22.000000000 +0100
+++ sawfish/lisp/sawfish/wm/workspace.jl	2013-01-26 17:29:03.000000000 +0100
@@ -549,13 +549,14 @@
 
 	 ;; first map new windows top-to-bottom
 	 (mapc (lambda (w)
-		 (when (window-appears-in-workspace-p w current-workspace)
-		   (swap-in w current-workspace))
-		 (when (and (window-appears-in-workspace-p w current-workspace)
-			    (window-get w 'placed))
-		   (if (window-viewable-p w)
-		       (show-window w)
-		     (hide-window w))))
+             (when (and (window-appears-in-workspace-p w current-workspace)
+                        (cdr (window-get w 'workspaces)))
+               (swap-in w current-workspace))
+             (when (and (window-appears-in-workspace-p w current-workspace)
+                        (window-get w 'placed))
+               (if (window-viewable-p w)
+                   (show-window w)
+                 (hide-window w))))
 	       order)
 
 	 ;; then unmap old-windows bottom-to-top
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iEYEARECAAYFAlEEES0ACgkQ5bxw1bjXsrBqEQCgiCjxZMXFL5Ozd/Mnflm7PK8X
LUAAoJsQ2twDy+l23auGmlXpBdM8CnTI
=igsX
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.