When to use ThisWindow vs Current?

Maybe I’m missing something subtle, but ThisWindow and Current seem to be interchangable. The only difference I can find is that a window command executed in the root window will apply to the focused window with Current, but nothing happens with ThisWindow. Is that it?

–Flatline

ThisWindow applies to the window that the function context is on. Depending on your configuration it maight always be the Focused window. However, if you for instance have a window with NeverFocus property it will never be Current, but it may well be ThisWindow, if you call functions by clicing it’s decor.

Another, probably more common example is if you use FvwmEvent, and bind a fintion to leve_notify, or add_window (without GrabFocus style) ThisWindow will be the window the event occured to, while Current will be the currently focused window. Also concider the command

Pick SomeFunction

Then in the function SomeFunction ThisWindow will be the window the user selected with the Pick.

This has been mentioned already on the wiki:

fvwmwiki.org/FunctionContext

It has also already been mentioned here:

viewtopic.php?t=1273&highlight=

– Thomas Adam

Shouldn’t this page be accessable from the front page or wiki site map? Now that I know it exists I can find it using “FindPage”, but I can’t find a way to the page from the front page.

Thanks for your responses. I now see why there is a need for both commands.

–Flatline