The fix is
inspired by FVWM3 which (like most/all other WMs) doesn't suffer from this
issue despite having a ClickToFocus option.
FVWM3
1) only grabs windows when necessary, so if someone doesn't use click-to-focus,
he's completely unaffected by the issue
2) releases the grab when a window gains focus
I was unable to implement 1) in Fluxbox because I could not figure out when and where all
the grabbing and ungrabbing happens. However implementing 2) was pretty easy.
Sadly it's buggy. I just happened to open krusader and hat focus in it, and then i couldn't use my Alt+Left-Mouse movement anymore, Did a quick rebuild w/o the patch ant it works again w/o a hitch.
I should have read your 1) lol :P
OnWindow Mod1 Mouse1 :MacroCmd {Raise} {Focus} {StartMoving}
Last edit: crpb 2024-11-26
It's an unfortunate side effect of the coarse nature of the patch.The ideal implementation would be to grab exactly those Button+Modifier combinations that are necessary due to the configuration. In your case that would be Button1+Alt. Unfortunately the Fluxbox grabbing code isn't easy to understand, so I wasn't able to do the fine-grained solution.
For you personally, you can simply change the patch so that in the function ungrabClickToFocus() after the XUngrabButton()... you add a XGrabButton(display,Button1,Mod1Mask,frame().window().window(),True,ButtonPressMask,GrabModeSync,GrabModeSync,None,None)
That will re-grab Button1+Alt so your movement works while Chromium-apps will still keep working unless they use Button1+Alt.
You may have to add a second XGrabButton with Mod1Mask+Mod2Mask to cover the case where you have NumLock enabled.