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
awful.tag.history.restore fails when previously selected tag was volatile #2780
Comments
The history of both tags and clients has to be burned to the ground and replaced by a better API. It's hopeless. I have a partially written Right now, it is low-ish in my priority list and I have little time for this to begin with. I am currently working on making the The API looks like: local h = gears.history {
unique = true, -- deduplicate automagically
count = false, -- keep track of the number of time an item was pushed
}
-- Listen to event to push/pop/remove objects.
client.connect_signal("focus" , h.push_front)
client.connect_signal("manage" , h.push_back )
client.connect_signal("unmanage", h.remove )
-- Abstract way to select objects.
h:connect_signal("select", function(_, c)
client.focus = c
end)
-- Support multiple iterators
local h_i = nil
-- Easy to use for transactions
awful.keygrabber {
keybindings = {
{{'Mod1' }, 'Tab', function() h_i:select_next () end},
{{'Mod1', 'Shift'}, 'Tab', function() h_i:select_previous() end},
},
-- Note that it is using the key name and not the modifier name.
stop_key = 'Mod1',
stop_event = 'release',
start_callback = function() h.paused = true; h_i = h:iterate_back() end,
stop_callback = function() h.paused = false; h_i = nil end,
export_keybindings = true,
}
-- Easy to iterate
for my_object in h:iterate_front() do
-- something
end If anyone is interested in implementing this, I would be grateful. My implementation is mostly the API skeleton and some stack code, so better start from scratch. |
Output of
awesome --version
:How to reproduce the issue:
First add a normal tag and then a volatile tag to the screen. Select the volatile tag and spawn a client. Close the client, which destroys the volatile tag and focuses the first tag. Call
awful.tag.history.restore
for the given screen.Actual result:
The first tag is unselected, leaving no tag selected.
Expected result:
Because there is no history to restore, the first tag should remain selected.
The text was updated successfully, but these errors were encountered: