On 01.07.2012 20:21, Felix Bier wrote:
> Am Sonntag, den 01.07.2012, 15:24 +0200 schrieb Felix Bier:
>> Hello list,
>> this patch makes tag.viewidx take a screen index rather than a screen
>> object, complying with its doc string. This seems to be more consistent
>> with other parts of the API to me, and also fixes #963. Config breakage
>> should be minimal, since this function is usually called without the
>> screen parameter.
>> Felix
>
> Unfortunately I noticed a problem with my patch when attempting to
> switch tags via mouse wheel. When tag.viewprev or tag.viewnext is set as
> a callback to a mouse button event for a tag, the screen parameter
> passed to viewidx will in fact be the originating tag. This is the right
> behaviour for i. e. viewonly, but causes an error with my patch. I
> guess this did not matter previously, because screen.index would
> evaluate to nil.
Tags have a .screen property, too. So that code actually worked fine before.
> I am not sure how this should be handled. The attached patch checks
> whether type(screen)=="number", which is the most simple fix, but not
> exactly beautiful. Alternatively, the previous patch could be reverted
> and this side effect be documented. The "right thing" would probably be
> to wrap viewnext/viewprev like awful.button({}, 4, function()
> awful.tag.viewnext() end), though that would be my least favourite
> option, because it would break a lot of configs. Other opinions?
Welcome to git/master. Everyone switching from 3.4 to this will get some
breakage anyway, so I'm not too worried about this. So this last thing would be
my favorite solution.
Uli
--
A learning experience is one of those things that say,
'You know that thing you just did? Don't do that.'
-- Douglas Adams
--
To unsubscribe, send mail to [email protected].