On 30 Apr 2004 00:33:57 -0400, Nicholas Paul Johnson wrote:
>
> I am trying to define a function, called Close_fcn, which is bound to the
> close button on my title bars. I would like this function to, in addition
> to closing the window, automatically focus another window which may or may
> not be on the same desk. What I have so far is:
>
> #------------------
> DestroyFunc Close_fcn
> AddToFunc Close_fcn
> + "I" Close
> + "I" Next (!Sticky) Focus
>
> Mouse 1 7 A Close_fcn
> #------------------
>
> However, I would like to impose an ordering on these windows: I would like
> it to (1) focus a window on the same desk if available, and (2) focus any
> other window if [1] fails.
>
> So, is this possible? I use fvwm 2.4.16
I just tried 2.5.x and 2.4.x and these behave equivally regarding this
feature. With ClickToFocus policy, Close alone works even better than you
want. I.e. if you close the focused window, the previously focused window
on the same desk gets the focus (not just any random window).
If you use MouseFocus this does quite not work, since you just get the
window under the pointer (or no window) focused. This is what MouseFocus
is all about.
And with SloppyFocus, Close works agian like you want, you either get the
previously focused window or a window under the pointer.
Please describe again what is your desired behaviour and what is your
focus policy for windows. Try Close alone, it works for me.
Use SloppyFocus instead of MouseFocus if this is what you want.
As for your Next command question, try this command:
Prev (CurrentDesk, !Sticky) Focus
> Also,
>
> Is it possibly for me to bind a function to the event that a window is
> closed (not necessarily explicitly)? The example of this situation that
> comes to mind is xpdf, which has a big 'quit' button. Can I bind a
> function to be called when this 'quit' button causes the window to close,
> just as if the close button on the titlebar were pushed?
Take a look at FvwmEvent module, it does what you want.
Just don't use both methods simultaneously, chose either "smart" close
button, or "smart" close event.
Regards,
Mikhael.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Sat May 01 2004 - 13:07:47 BST