Propagate Layer changes via Style command on-the-fly.
[fvwm.git] / doc / commands / WindowId.xml
blobcb795ad585ce322a6f6b29454857de602c11d5f6
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" >
7 %myents;
8 ]>
11 <section id='WindowId'>
12 <title>WindowId</title>
14 <cmdsynopsis>
15         <command>WindowId</command
16         ><group choice='plain'
17                 ><arg choice='plain'
18                         ><arg choice='opt'
19                                 ><replaceable>id</replaceable
20                         ></arg
21                         ><arg choice='opt'
22                                 >(<replaceable>conditions</replaceable
23                         >)</arg
24                 ></arg
25                 ><arg choice='opt'
26                         >root <arg choice='opt'
27                                 ><replaceable>screen</replaceable
28                         ></arg
29                 ></arg
30         ></group
31         ><arg choice='plain'
32                 ><replaceable>command</replaceable
33         ></arg>
34 </cmdsynopsis>
37 <para>The
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>.
46 If no
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"/>
54 command.
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>
66 <programlisting>
67 WindowId 0x34567890 <fvwmref cmd="Raise"/>
68 WindowId root 1 <fvwmref cmd="WarpToWindow"/> 50 50
69 WindowId $0 (Silly_Popup) <fvwmref cmd="Delete"/>
70 </programlisting>
72 <para>In the past this command was mostly useful for functions used with
73 the
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
81 proceeding.</para>
83 <programlisting>
84 <fvwmref cmd="Pick"/> <fvwmref cmd="SetEnv"/> BOOKMARKED_WINDOW $[w.id]
85 WindowId $[BOOKMARKED_WINDOW] <fvwmref cmd="WarpToWindow"/>
86 </programlisting>
88 </section>