File: WindowId.xml

package info (click to toggle)
fvwm 1%3A2.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 15,968 kB
  • sloc: ansic: 145,836; xml: 17,096; perl: 7,237; sh: 5,100; makefile: 1,101; yacc: 688; lex: 187; sed: 11
file content (88 lines) | stat: -rw-r--r-- 2,656 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?xml version="1.0" encoding="UTF-8" ?>
<!-- $Id$ -->
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  "../docbook-xml/docbookx.dtd"
[
<!ENTITY % myents SYSTEM "../fvwm.ent" >
%myents;
]>


<section id='WindowId'>
<title>WindowId</title>

<cmdsynopsis>
	<command>WindowId</command
	><group choice='plain'
		><arg choice='plain'
			><arg choice='opt'
				><replaceable>id</replaceable
			></arg
			><arg choice='opt'
				>(<replaceable>conditions</replaceable
			>)</arg
		></arg
		><arg choice='opt'
			>root <arg choice='opt'
				><replaceable>screen</replaceable
			></arg
		></arg
	></group
	><arg choice='plain'
		><replaceable>command</replaceable
	></arg>
</cmdsynopsis>


<para>The
<emphasis remap='B'>WindowId</emphasis>
command looks for a specific window
<replaceable>id</replaceable>
and runs the specified
<replaceable>command</replaceable>
on it.  The second form of syntax retrieves the window id of the
root window of the given
<replaceable>screen</replaceable>.
If no
<replaceable>screen</replaceable>
is given, the current screen is assumed.  The window indicated by
<replaceable>id</replaceable>
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
<fvwmref cmd="WarpToWindow"/>
command.
Returns -1 if no window with the given id exists.
See <fvwmref sect="conditionals" opt="conditions" name="Conditions"/> section for a list of conditions.</para>

<para>This command implies the conditions
<emphasis remap='I'>CirculateHit</emphasis>, <emphasis remap='I'>CirculateHitIcon</emphasis> and <emphasis remap='I'>CirculateHitShaded</emphasis>.
They can be turned off by specifying
<emphasis remap='I'>!CirculateHit</emphasis>
etc. explicitly.</para>

<para>Examples:</para>

<programlisting>
WindowId 0x34567890 <fvwmref cmd="Raise"/>
WindowId root 1 <fvwmref cmd="WarpToWindow"/> 50 50
WindowId $0 (Silly_Popup) <fvwmref cmd="Delete"/>
</programlisting>

<para>In the past this command was mostly useful for functions used with
the
<fvwmref cmd="WindowList"/>
command, or for selective processing of
<fvwmref mod="FvwmEvent"/>
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.</para>

<programlisting>
<fvwmref cmd="Pick"/> <fvwmref cmd="SetEnv"/> BOOKMARKED_WINDOW $[w.id]
WindowId $[BOOKMARKED_WINDOW] <fvwmref cmd="WarpToWindow"/>
</programlisting>

</section>