RabidVWM or code trick Thread last updated on 2003-10-07 03:51:03

Posted by member 7223 on 2003-10-06 09:36:21

Hi,

I need to call a !bang each time a window get the focus and I wonder if someone knows a trick to do it.
Alternatively (yes, I know Rabidcow has a lot of work this time - humm, I should say everytime...) I'll appreciate a RabidVWM setting like:
VWMOnFocusWindow !bang


Note: with past RabidVWM releases, this used to be done with VWMOnMoveWindow which was called each time focus changed. But, actually, this setting only works as it should... and this trick doesn't work anymore

Posted by member 99 on 2003-10-06 11:20:03 link

VWMOnRepaint maybe? It wouldn't be exactly right, but it might be close.

Posted by member 7223 on 2003-10-06 11:26:14 link

Does it work with VWMHidden ?

Posted by member 37809 on 2003-10-06 12:33:16 link

If not, you could try placing or moving it offscreen as an alternative...somewhere drastic like $ResolutionX*4$ $ResolutionX*4$

Posted by member 99 on 2003-10-06 17:23:43 link

You have to move it offscreen as tnl suggests or something (eg, hide it off the edge of an lsbox). I don't think the vwm even keeps track of focus changes while it's hidden. (technically it never does, but window z-order change is pretty close)

I'd recommend the coordinates $allRight+1$, $allBottom+1$, with suitable defaults for allRight/Bottom.

And come to think of it, VWMOnRepaint will also happen when the focused window changes size or position. If you only want focus, you'll get some extras.

Posted by member 7223 on 2003-10-07 00:34:41 link

Ok, I've tested it and, in fact, it doesn't do what I expect. But, what do I want to do ?
Very simple. Floating stuff that goes ontop on leftdown and go back (onbottom) when focus is given to a window.
The problem is that, using existing VWMOn..., if I re-select the last focused window, VWMOn... will not call the !bang
...and it won't be user-friendly if there's the need to click on the desktop (for example) or to move the window to make the stuff go onbottom

aaarrrggghhh...

Note: offscreen positioning should work with $resolutionx$ $resolutiony$; no ?

Posted by member 99 on 2003-10-07 03:51:03 link

Ok, if I understand you correctly... LiteStep windows are invisible to the VWM. What you want is an OnUnfocus/OnBlur event on the window that you're sending back to the bottom.

Otherwise, that's very close to floating behavior. I can't think of anything else. :/

I was confused when I put the +1s in there... but it's possible for $resolutionx$ $resolutiony$ to be on another monitor. (you know how I am with multimon ;) It's fine if you don't care about that though. :) After all, it's not terribly likely (can happen with an insane person and 2 monitors or more monitors and more sane). $ResolutionX*4$'s even less likely to have that problem, but it's still possible.