Re: [Sawfish] Activate workspace if 'focus-windows-when-mapped set patch |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/sawfish Archives
]
- To: sawfish@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [Sawfish] Activate workspace if 'focus-windows-when-mapped set patch
- From: Teika Kazura <teika@xxxxxxxxxxx>
- Date: Sat, 31 Mar 2012 12:50:07 +0900 (JST)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=zf6WcZV5lYEcjZfqNcjIMeOri7EUn3qyqmyNhBqs9j5CQHDJmsIdNkshAeqObegREvyrWCYXu9m/t1o9OGknwYciil6N8XzjnWCeOfBjrHQgG0HpSKyxHkNa/FfgMkhvYdj1PL63GWlQbT9u0zdZC/8MJYNar6Jri0iWTY1h3Vg=; h=Date:Message-Id:To:Subject:From:In-Reply-To:References:Mime-Version:Content-Type:Content-Transfer-Encoding;
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