bakkeby / patches

Collection of patches for dwm, st and dmenu
284 stars 30 forks source link

[bug] netactiverules - rule 2 focuses only client tag or client tag with the first tag #77

Closed luravoid closed 10 months ago

luravoid commented 10 months ago

When receiving a net active signal for programs with rule 2, only the client tag or client tag with the first tag gets focused, regardless of which tag I get the signal on. I tested this without any additional patches on clean dwm 6.4

bakkeby commented 10 months ago

I am not entirely sure what you mean.

Are you referring specifically to receiving clients that are assigned to more than one tag?

Do you mean something like this perhaps?

luravoid commented 10 months ago

Let's say I'm on tag 3, and I have program "obsidian" on tag 5. When I use xdotool search --name "obsidian" windowactivate it always toggles tag 1 and tag 5 instead of toggling tag 3 and tag 5 image

bakkeby commented 10 months ago

https://github.com/bakkeby/patches/blob/d439a88d1901ae0f5edcf6f6cf7ca93a138d27c6/dwm/dwm-netactiverules-6.3.diff#L167-L178

I see, in the line view(&((Arg) {.ui = c->mon->seltags | (1 << i)})); we are passing c->mon->seltags which is either 0 or 1. It should have said c->mon->tagset[c->mon->seltags].

luravoid commented 10 months ago

Works perfect. Thank you