1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!-- $Id: WindowId.xml,v 1.3 2007/06/16 12:38:46 griph Exp $ -->
3 <!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
4 "../docbook-xml/docbookx.dtd"
6 <!ENTITY % myents SYSTEM "../fvwm.ent" >
11 <section id='WindowId'>
12 <title>WindowId</title>
15 <command>WindowId</command
16 ><group choice='plain'
19 ><replaceable>id</replaceable
22 >(<replaceable>conditions</replaceable
26 >root <arg choice='opt'
27 ><replaceable>screen</replaceable
32 ><replaceable>command</replaceable
38 <emphasis remap='B'>WindowId</emphasis>
39 command looks for a specific window
40 <replaceable>id</replaceable>
41 and runs the specified
42 <replaceable>command</replaceable>
43 on it. The second form of syntax retrieves the window id of the
44 root window of the given
45 <replaceable>screen</replaceable>.
47 <replaceable>screen</replaceable>
48 is given, the current screen is assumed. The window indicated by
49 <replaceable>id</replaceable>
50 may belong to a window not managed by fvwm or even a window on a
51 different screen. Although most commands can not operate on such
52 windows, there are some exceptions, for example the
53 <fvwmref cmd="WarpToWindow"/>
55 Returns -1 if no window with the given id exists.
56 See <fvwmref sect="conditionals" opt="conditions" name="Conditions"/> section for a list of conditions.</para>
58 <para>This command implies the conditions
59 <emphasis remap='I'>CirculateHit</emphasis>, <emphasis remap='I'>CirculateHitIcon</emphasis> and <emphasis remap='I'>CirculateHitShaded</emphasis>.
60 They can be turned off by specifying
61 <emphasis remap='I'>!CirculateHit</emphasis>
62 etc. explicitly.</para>
64 <para>Examples:</para>
67 WindowId 0x34567890 <fvwmref cmd="Raise"/>
68 WindowId root 1 <fvwmref cmd="WarpToWindow"/> 50 50
69 WindowId $0 (Silly_Popup) <fvwmref cmd="Delete"/>
72 <para>In the past this command was mostly useful for functions used with
74 <fvwmref cmd="WindowList"/>
75 command, or for selective processing of
76 <fvwmref mod="FvwmEvent"/>
77 calls (as in the last example), but currently these handler functions
78 are called within a window context, so this command is not really
79 needed in these cases. Still it may be useful if, for example, the
80 window id should be stored in the environment variable for a further
84 <fvwmref cmd="Pick"/> <fvwmref cmd="SetEnv"/> BOOKMARKED_WINDOW $[w.id]
85 WindowId $[BOOKMARKED_WINDOW] <fvwmref cmd="WarpToWindow"/>