Hi,

I've more or less ported my config/shifty to work with the recent
commits on next branch  (arrange->tag hooks) but I'm running into a
very strange issue which I'm quite stuck trying to debug.

Imagine that these are my tags:
A1, A2, A3, B1, B2, B3, B4

I have a global binding for XF86Back/Forward to run awful.tag.viewprev/next().

1. When on tag A1 XF86Forward will switch to A2 (as expected)
2. When on tag A2 XF86Forward will switch to A3 (as expected)
3. When on tag A3 XF86Forward will switch to B2 (as opposed to expected B1)
4. When on tag B1 XF86Forward will switch to B2 (as expected)
5. When on tag B2 XF86Forward will switch to B3 (as expected)
6 .When on tag B3 XF86Forward will switch to B4 (as expected)
7. When on tag B4 XF86Forward will switch to A1 (as expected)
8. When on tag A1 XF86Back will switch to B3 (as opposed to expected B4)

Quick investigation shows that, for some reason, in situations 3 and 8
awful.tag.view{prev,next} function is executed twice.
So, in simple terms, when switching from A-type tag to B-type tag (and
vice versa) it switches to 2nd tags over instead of next/previous one.


For the difference between tags A and B...

To achieve per-tag keybindings in Shifty I run a function like this
(with awful.hooks.tags.register):
function tagkeys(s, t, v)
  if v == "select" then
    local keys = awful.tag.getproperty(t, "keys") or config.globalkeys
    if keys then root.keys(keys) end
  end
end

This basically sets root.keys to either:
A. table of "globalkeys" -- by default
B. table of "globalkeys + per-tag keys" stored in tag property 'keys'
-- when tag has some special keybindings listed

I've checked what root.keys() returns for both types of tags and
grepping for XF86Forward gives the same number of entries which
indicates that I do not have the same function bound to the same
keybinding twice.

I've also tried storing globalkeys table in the tag property 'keys'
for A-tags (to make tagkeys() get key tables from the same source) and
it doesn't make any difference.

My best conclusion so far is that when re-setting root.keys with
different length tables (note that I still run root.keys({ ... }) even
when switching A1->A2 and it works fine) something goes wrong and the
keybinding/function is done twice.

For the record, this worked perfectly fine before when I was using
'arrange' hook to check for tag switch.

Any insight as to why that or at least how to debug it further would
be *greatly* appreciated.

cheers,
koniu

-- 
To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.

Reply via email to