Hi again,
In the window properties, there is an option switchto, which allows to
switch to a newly created window if it is created in the same frame.
If the window is created in another frame (according to a placement
policy like heuristics.lua), then, is there a way to switch to the
right frame also ?
Currently, I have a global variable that I set to the newly created
window in my placement policy, and I "goto" this window in the
"clientwin_added" hook, like this :
function switch_to_last ()
if heuristics.lastwindow then
heuristics.lastwindow:goto()
-- Other window creation not using this heuristic will not be
--affected.
heuristics.lastwindow = nil
end
end
[...]
add_to_hook("clientwin_added", switch_to_last)
[...]
Is there a better way to do this ? (or, there could be one in a future
version of Ion ?)
Thanks !
--
Matthieu