Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag selection is not restored properly #43

Open
trinistr opened this issue Jul 27, 2020 · 0 comments
Open

Tag selection is not restored properly #43

trinistr opened this issue Jul 27, 2020 · 0 comments

Comments

@trinistr
Copy link

trinistr commented Jul 27, 2020

When finishing the cycling, tags on the final client's screen are unselected, leaving only the client's first tag.

Relevant sections are in the exit_grabber() function (inside cyclefocus.cycle()).
Following part is supposed to restore the tags, but it does not actually handle the client's screen. A separate loop is needed to preserve the behaviour mentioned in the comment.

            -- Restore previously selected tags for screen(s).
            -- With a given client, handle other screens first, otherwise
            -- the focus might be on the wrong screen.
           if restore_tag_selected then
                for s in capi.screen do
                    if not c or s ~= c.screen then
                        for _,t in pairs(s.tags) do
                            t.selected = restore_tag_selected[s][t]
                        end
                    end
                end
+                if c then
+                    for _,t in pairs(c.screen.tags) do
+                         t.selected = restore_tag_selected[c.screen][t]
+                    end
+                end
            end

Tag selection is actually changed by raise_client_fn(), because the default implementation (cyclefocus.raise_client_without_focus()) actively selects client's first tag. This requires moving the block where it is called before the tag restoration logic. There don't seem to be any issues with doing that, but this probably needs further testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant