# WindowId

`WindowId` id(conditions)root screen command

The WindowId command looks for a specific window id and runs the specified command on it. The second form of syntax retrieves the window id of the root window of the given screen. If no screen is given, the current screen is assumed. The window indicated by id may belong to a window not managed by fvwm or even a window on a different screen. Although most commands can not operate on such windows, there are some exceptions, for example the command. Returns -1 if no window with the given id exists. See section for a list of conditions.

This command implies the conditions CirculateHit, CirculateHitIcon and CirculateHitShaded. They can be turned off by specifying !CirculateHit etc. explicitly.

Examples:

    WindowId 0x34567890
    WindowId root 1  50 50
    WindowId $0 (Silly_Popup)

In the past this command was mostly useful for functions used with the command, or for selective processing of calls (as in the last example), but currently these handler functions are called within a window context, so this command is not really needed in these cases. Still it may be useful if, for example, the window id should be stored in the environment variable for a further proceeding.

      BOOKMARKED_WINDOW $[w.id]
    WindowId $[BOOKMARKED_WINDOW]