I use mc (Midnight Commander) a lot in rxvt windows, but if you happen to click a column heading in mc it changes the sort order when all I wanted was to focus the window. (sloppy focus) Is it possible to define a window style where the first click in the window only focuses the window and doesn’t get passed to the application? Even that may prove to be a pain, right now I have mouse support turned off in mc altogether. Any other ideas?
[edit]: The first click in an unfocused window, I meant to say.
No. This is only complicating matters. I want to know what the problem is, and when I do, I all but guarantee you that one of the FP* options will work. BTW, your FvwmEvent idea is better-suited to FvwmAuto.
It seems that FP* option won’t solve Alan’s problem, because the mouse click event is passed to MC, no matter which Focus Policy is chosen.
Perhaps the only way is to change the behavior of click event.
Yeah, you’re right. I don’t know there is such a module.
Here is the solution by FvwmAuto:
DestroyFunc StartFunction
AddToFunc StartFunction
+ I Module FvwmAuto 0 "PointerWindow (*Rxvt,mc*) SetEnv EnterMc" "ThisWindow (*Rxvt,mc*) UnSetEnv EnterMc"
AddToFunc ActionOnMc
+ C Test (EnvIsSet EnterMc) Schedule 100 UnSetEnv EnterMc
+ C Test (!EnvIsSet EnterMc) FakeClick depth 0 press 1 wait 20 release 1
mouse (mc*) 1 W A ActionOnMc
Sorry to be unclear. What I’m looking for is to have the first click in an unfocused window only focus the window, not get passed through to the application(s) inside. In this case it’s mc in an rxvt window. I’d add it to the style of the rxvt window or define a new one. Focusing the window would consume the click, not pass it on.