Re: [Sawfish] Activate workspace if 'focus-windows-when-mapped set patch

[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]


Why anyone hasn't complained so far??

Let me give a slight fix. It should be combined with the handling
of focus-when-mapped, which is done in wm/state/transient.jl. (You can
search by "git grep", like:
 $ git grep focus-when-mapped
Or you can use "ack" command.)
I wrote a patch. It also ensures that the switching of the
workspace is done before set-input-focus. It should be so if your
focus-mode is enter-exit. It's done in map-notify-hook.

fuchur, could you test it? I don't use workspaces. (Please use the
original focus.jl)

Teika (Teika kazura)

--- transient.jl.orig	2012-03-31 12:42:33.085779514 +0900
+++ transient.jl	2012-03-31 12:43:53.388769970 +0900
@@ -177,6 +177,8 @@
                                (not (window-get w 'never-focus))
                                (not (window-get w 'inhibit-focus-when-mapped)))
                               (window-get w 'focus-when-mapped))))))
+      (unless (window-in-workspace-p w current-workspace)
+	(select-workspace (car (window-workspaces w))))
       (set-input-focus w)))
 
   ;; If a transient window gets unmapped that currently has the input


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/