Hi Viacheslav,

You probably have to restore focus, look at the
awful.client.focus.history.get function.
Another idea is to loop over the screens beginning with the current one
(with the focus or mouse) plus one and to finish with the current one:
awful.tag.gettags((current_screen + screen) % screen.count)[i]

Kind regards,
Alexis

Le ven. 19 févr. 2016 à 18:23, Viacheslav Mikerov <slavamike...@gmail.com>
a écrit :

> I am using two monitors and I wish to switch tags on both monitors, so I
> am using this for the tag switching function:
>
>                    for screen = 1, screen.count() do
>                         local tag = awful.tag.gettags(screen)[i]
>                         if tag then
>                            awful.tag.viewonly(tag)
>                         end
>                     end
>
> The problem is that all the time when I switch between tags, I lose window
> focus if it was on the first screen.
>
> How can I fix that?
>
> Best Regards,
> Viacheslav
>

Reply via email to