A leaveEvent is generally triggered when the pointer leaves a window. This is different from a change in focus (more about this later.)
In this case it will, yes – for two reasons. One, you’ve actually told it to focus (that in itself will generate a focus event), and secondly, the WarpToWindow directive shifts the pointer – hence you’ll get a leave_window event.
Oh, I know that. Here’s what you had:
The problem with the above is that you aren’t echo’ing anything back to FVWM to interpret. The whole reason for using PipeRead is so that the shell can evaluate a condition, and return something back to FVWM. In fact, what you’ve written will work, if you insert an echo statement:
Of course, you’ll find yourself in a battle if you do this with your pointer. (Hint: You might be able to avoid this via the ‘PointerWindow’ command.) The question is perhaps more one of “how” do you plan on going from one window to the other? If it is via a key-binding, then doing something like:
PointerWindow (name_of_window) All (currentdesk,some_other_name) FlipFocus
… With the above, the FlipFocus will cause an enter_window event, and a focus_event. Adding ‘NoWarp’ to the end of that will just cause a focus_event — an interesting little tidbit for you.