bakkeby / dwm-flexipatch

A dwm build with preprocessor directives to decide which patches to include during build time
MIT License
1.18k stars 239 forks source link

dwm duplicating focus with SWITCHTAG_PATCH #425

Closed Ampnbsp closed 6 months ago

Ampnbsp commented 6 months ago

How to reproduce

  1. E.g. dwm has this rule RULE(.class = "ArmCord", .monitor = 1, .switchtag = 3, .tags = 1 << 7);
  2. Launch this program from the other monitor.

After these steps the focus duplicates.

pictureissue

This issue was fixed with unfocus(selmon->sel, 1, NULL); before the selmon = c->mon; and it seems work fine.

bakkeby commented 6 months ago

I have looked at this again and the unfocus call makes sense where you added it. Have committed it now. Thanks for highlighting.