WABA: Adding window manager spec. (Revision ???? status ????)

svn path=/trunk/kdebase/kwin/; revision=52058
This commit is contained in:
Waldo Bastian 2000-06-04 21:39:33 +00:00
parent 45e0fc465a
commit 15bc6f4f1b
6 changed files with 1912 additions and 0 deletions

310
wm-spec/index.html Normal file
View file

@ -0,0 +1,310 @@
<HTML
><HEAD
><TITLE
>Extended Window Manager Hints</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
REL="NEXT"
TITLE="Root Window Properties (+Related Messages)"
HREF="x71.html"></HEAD
><BODY
CLASS="ARTICLE"
><DIV
CLASS="ARTICLE"
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="TITLE"
><A
NAME="AEN2"
>Extended Window Manager Hints</A
></H1
><HR></DIV
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
><A
HREF="index.html#AEN5"
>Introduction</A
></DT
><DT
><A
HREF="x71.html"
>Root Window Properties (+Related Messages)</A
></DT
><DT
><A
HREF="x123.html"
>Other Root Window Messages</A
></DT
><DT
><A
HREF="x137.html"
>Application Window Properties</A
></DT
><DT
><A
HREF="x207.html"
>Window Manager Protocols</A
></DT
><DT
><A
HREF="x216.html"
>Implementation notes</A
></DT
></DL
></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN5"
>Introduction</A
></H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN7"
>What is this spec?</A
></H2
><P
>This spec defines interactions between window managers, applications and the utilities that form part of a desktop environment. It builds on the ICCCM, which defines wm/client interactions at a lower level. It was born out of a need to replace the original Gnome WM specification, although this specification has been designed to be independent of any one desktop environment.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN10"
>Language used in this specification</A
></H2
><P
>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
interpreted as described in RFC 2119.
</P
><P
>The key words "Window Manager" refer to a window manager which is adopting this
specification. "Pager" refers to desktop utility applications, including
pagers and taskbars. "Application" refers to other clients. "Clients" refers
to Pagers + Applications ie. all X clients, except for the Window Manager.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN14"
>Changes since 1.9d</A
></H2
><P
></P
><UL
><LI
><P
>Added _NET_VIRTUAL_ROOTS
</P
></LI
><LI
><P
>Added note about ICCCM compliant window moves.
</P
></LI
><LI
><P
>Added _NET_WM_HANDLED_ICONS
</P
></LI
><LI
><P
>Added _NET_SUPPORTING_WM_CHECK
</P
></LI
><LI
><P
>Removed degrees of activation
</P
></LI
></UL
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN27"
>Changes since 1.9c</A
></H2
><P
></P
><UL
><LI
><P
>Removed packaging of hints into 2 X properties. Jim Gettys points out that the
performance gains of fewer round trips can be better achieved using Xlib
routines.
</P
></LI
><LI
><P
>Clarified that _NET_DESKTOP_VIEWPORT is in pixels
</P
></LI
><LI
><P
>_NET_DESKTOP_VIEWPORT is now an array, one for each desktop, to allow for
different active viewports on different desktops
</P
></LI
><LI
><P
>_NET_WM_STRUT now only applies on desktops on which the client is visible
</P
></LI
><LI
><P
>Introduced RFC 2119 language, and attempted to clarify the roles of the Window
Manager, Pagers and Applications
</P
></LI
><LI
><P
>Added _NET_WM_NAME
</P
></LI
><LI
><P
>_NET_DESKTOP_NAMES now in UTF8
</P
></LI
><LI
><P
>Desktops now start from 0
</P
></LI
><LI
><P
>Added _NET_WM_PID
</P
></LI
><LI
><P
>Added _NET_WM_PING protocol
</P
></LI
><LI
><P
>Added _NET_WM_STATE_SKIP_TASKBAR
</P
></LI
></UL
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN52"
>Changes since 1.9b</A
></H2
><P
></P
><UL
><LI
><P
>Removed _NET_NUMBER_OF_DESKTOPS client message, as it overlaps unnecessarily with _NET_{INSERT/DELETE}_DESKTOP.</P
></LI
><LI
><P
>Replaced _NET_WM_LAYER and _NET_WM_HINTS with _NET_WM_WINDOW_TYPE functional hint.</P
></LI
><LI
><P
>Changed _NET_WM_STATE to a list of atoms, for extensibility.</P
></LI
><LI
><P
>Expanded description of _NET_WORKAREA and _NET_WM_STRUT.</P
></LI
><LI
><P
>Removed _NET_WM_SIZEMOVE_NOTIFY protocol. </P
></LI
><LI
><P
>Added degrees of activation to _NET_ACTIVE_WINDOW client message</P
></LI
><LI
><P
>Added _NET_WM_ICON</P
></LI
><LI
><P
>My comments are in [[ ]]. Comments from Marko's draft are in [[MM: ]]</P
></LI
></UL
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x71.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Root Window Properties (+Related Messages)</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

207
wm-spec/x123.html Normal file
View file

@ -0,0 +1,207 @@
<HTML
><HEAD
><TITLE
>Other Root Window Messages</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
REL="HOME"
TITLE="Extended Window Manager Hints"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Root Window Properties (+Related Messages)"
HREF="x71.html"><LINK
REL="NEXT"
TITLE="Application Window Properties"
HREF="x137.html"></HEAD
><BODY
CLASS="SECT1"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Extended Window Manager Hints</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x71.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x137.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN123"
>Other Root Window Messages</A
></H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN125"
>_NET_CLOSE_WINDOW</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_CLOSE_WINDOW</PRE
></TD
></TR
></TABLE
><P
> Pagers wanting to close a window MUST send a _NET_CLOSE_WINDOW client message request to the root window (type _NET_ACTIVE_WINDOW, format 32, l[0]=0 /*may be used later*/, window should be set to the window to close). The Window Manager MUST then attempt to close the window specified.
</P
><P
> Rationale: A window manager might be more clever than the usual method (send WM_DELETE message if the protocol is selected, XKillClient otherwise). It might introduce a timeout, for example. Instead of duplicating the code, the Window Manager can easily do the job.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN130"
>_NET_WM_MOVERESIZE</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_WM_MOVERESIZE
window = target app window
message_type = _NET_WM_MOVERESIZE
format = 16
data.s[0] = x_root
data.s[1] = y_root
data.s[2] = direction</PRE
></TD
></TR
></TABLE
><P
> This message allows an application to initiate window movement or resizing. This allows the application to define its own move and size "grips", whilst letting the window manager control the actual move/resize. This means that all moves / resizes can happen in a consistent manner as defined by the WM.
</P
><P
> When sending this message, x_root and y_root SHOULD indicate the position of the mouse click [[PDW: with respect to what?]] and direction MUST indicate whether this is a move or resize event, and if it is a resize event, which edges of the window the size grip applies to.
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>#define _NET_WM_MOVERESIZE_SIZE_TOPLEFT 0
#define _NET_WM_MOVERESIZE_SIZE_TOP 1
#define _NET_WM_MOVERESIZE_SIZE_TOPRIGHT 2
#define _NET_WM_MOVERESIZE_SIZE_RIGHT 3
#define _NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT 4
#define _NET_WM_MOVERESIZE_SIZE_BOTTOM 5
#define _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT 6
#define _NET_WM_MOVERESIZE_SIZE_LEFT 7
#define _NET_WM_MOVERESIZE_MOVE 8 /* Movement only */</PRE
></TD
></TR
></TABLE
><P
> [[PDW: Why do we need to indicate the direction? The WM could guess this from the click position - some WMs (eg. sawmill) have code for doing something similar when you hold eg. Meta + click in the client area... ]]
</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x71.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x137.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Root Window Properties (+Related Messages)</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Application Window Properties</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

562
wm-spec/x137.html Normal file
View file

@ -0,0 +1,562 @@
<HTML
><HEAD
><TITLE
>Application Window Properties</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
REL="HOME"
TITLE="Extended Window Manager Hints"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Other Root Window Messages"
HREF="x123.html"><LINK
REL="NEXT"
TITLE="Window Manager Protocols"
HREF="x207.html"></HEAD
><BODY
CLASS="SECT1"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Extended Window Manager Hints</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x123.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x207.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN137"
>Application Window Properties</A
></H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN139"
>_NET_PROPERTIES</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_PROPERTIES, ATOM[]/32</PRE
></TD
></TR
></TABLE
><P
>Enables only use of listed properties on this windows. If this property is
set, the Window Manager MUST only handle (XGetWindowProperty) properties
listed here. This property MUST be set by the Client before any other _NET
hints can be used. If this property is set, it MUST also include any ICCCM
client-only (not WM_STATE) hints that are set by the client. If WM_PROTOCOLS
is not listed here, the Window Manager SHOULD assume that it contains exactly
WM_DELETE_WINDOW.
</P
><P
>This is a performance optimization. [[MM: I still have to do a benchmark.]]
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN144"
>_NET_WM_NAME</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_WM_NAME</PRE
></TD
></TR
></TABLE
><P
>The Client SHOULD set this to the title of the window in UTF8 encoding. If
set, the Window Manager should use this in preference to WM_NAME.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN148"
>_NET_WM_DESKTOP</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_WM_DESKTOP &#60;desktop&#62;, CARDINAL/32</PRE
></TD
></TR
></TABLE
><P
>Cardinal to determine the desktop the window is in (or wants to be) starting
with 0 for the first desktop. A Client MAY choose not to set this property,
in which case the Window Manager SHOULD place as it wishes. 0xFFFFFFFF
indicates that the window SHOULD appear on all desktops/workspaces.
</P
><P
>The Window Manager should honor _NET_WM_DESKTOP whenever a withdrawn window
requests to be mapped.
</P
><P
>A Client can request a change of desktop for a non-withdrawn window by sending
a _NET_WM_DESKTOP client message to the root window (window is the respective
window, type _NET_WM_DESKTOP, format 32, l[0]=&#60;desktop&#62;)
</P
><P
> The Window Manager MUST keep this property updated on all windows.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN155"
>_NET_WM_WINDOW_TYPE</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_WM_WINDOW_TYPE, ATOM[]/32</PRE
></TD
></TR
></TABLE
><P
>This MUST be set by the Client before mapping, to a list of atoms indicating
the functional type of the window. This property SHOULD be used by the window
manager in determining the decoration, stacking position and other behaviour
of the window. The Client SHOULD specify window types in order of preference
(the first being most preferable), but MUST include at least one of the basic
window type atoms from the list below. This is to allow for extension of the
list of types, whilst providing default behaviour for window managers that do
not recognise the extensions.
</P
><P
>Rationale: This hint is intend to replace the MOTIF hints. One of the
objections to the MOTIF hints is that they are a purely visual description of
the window decoration. By describing the function of the window, the window
manager can apply consistent decoration and behaviour to windows of the same
type. Possible examples of behaviour include keeping dock/panels on top or
allowing pinnable menus / toolbars to only be hidden when another window has
focus (NextStep style).
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_WM_WINDOW_TYPE_DESKTOP, ATOM
_NET_WM_WINDOW_TYPE_DOCK, ATOM
_NET_WM_WINDOW_TYPE_TOOLBAR, ATOM
_NET_WM_WINDOW_TYPE_MENU, ATOM
_NET_WM_WINDOW_TYPE_DIALOG, ATOM
_NET_WM_WINDOW_TYPE_NORMAL, ATOM</PRE
></TD
></TR
></TABLE
><P
>_NET_WM_WINDOW_TYPE_DESKTOP indicates a desktop feature. This can include a
single window containing desktop icons with the same dimensions as the screen,
allowing the desktop environment to have full control of the desktop, without
the need for proxying root window clicks.
</P
><P
>_NET_WM_WINDOW_TYPE_DOCK indicates a dock or panel feature. Typically a
window manager would keep such windows on top of all other windows.
</P
><P
>_NET_WM_WINDOW_TYPE_TOOLBAR and _NET_WM_WINDOW_TYPE_MENU indicate toolbar and
pinnable menu windows, respectively.
</P
><P
>_NET_WM_WINDOW_TYPE_DIALOG indicates that this is a dialog window. If
_NET_WM_WINDOW_TYPE is not set, then windows with WM_TRANSIENT_FOR set MUST
be taken as this type.
</P
><P
>_NET_WM_WINDOW_TYPE_NORMAL indicates that this is a normal, top-level window.
Windows with neither _NET_WM_WINDOW_TYPE nor WM_TRANSIENT_FOR are set MUST
be taken as this type.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN166"
>_NET_WM_STATE</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_WM_STATE, ATOM[]</PRE
></TD
></TR
></TABLE
><P
>A list of hints describing the state window. The Window Manager SHOULD honor
_NET_WM_STATE whenever a withdrawn window requests to be mapped. A Client
wishing to change the state of a window MUST send a _NET_WM_STATE client
message to the root window (see below). The Window Manager MUST keep this
property updated to reflect the current state of the window.
</P
><P
>Possible atoms are:
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_WM_STATE_MODAL, ATOM
_NET_WM_STATE_STICKY, ATOM
_NET_WM_STATE_MAXIMIZED_VERT, ATOM
_NET_WM_STATE_MAXIMIZED_HORZ, ATOM
_NET_WM_STATE_SHADED, ATOM
_NET_WM_STATE_SKIP_TASKBAR, ATOM</PRE
></TD
></TR
></TABLE
><P
>_NET_WM_STATE_MODAL indicates that this is a modal dialog box. The
WM_TRANSIENT_FOR hint MUST be set to indicate which window the dialog is a
modal for, or set to the root window if the dialog is a modal for its window
group.
</P
><P
>_NET_WM_STATE_STICKY indicates that the Window Manager SHOULD keep the
window's position fixed on the screen, even when the virtual desktop scrolls.
</P
><P
>_NET_WM_STATE_MAXIMIZED_{VERT,HORZ} indicates that the window is
{vertically,horizontally} maximised.
</P
><P
>_NET_WM_STATE_SHADED indicates that the window is shaded.
</P
><P
>_NET_WM_SKIP_TASKBAR indicates that a window should not be included on a
taskbar.
</P
><P
>To change the state of a mapped window, a Client MUST send a _NET_WM_STATE
client message to the root window (window is the respective window, type
_NET_WM_STATE, format 32, l[0]=&#60;the action, as listed below&#62;,
l[1]=&#60;First property to alter&#62;, l[2]=&#60;Second property to alter&#62;).
This message allows two properties to be changed simultaneously, specifically
to allow both horizontal and vertical maximisation to be altered together.
l[2] MUST be set to zero if only one property is to be changed. l[0], the
action, MUST be one of:
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_WM_STATE_REMOVE 0 /* remove/unset property */
_NET_WM_STATE_ADD 1 /* add/set property */
_NET_WM_STATE_TOGGLE 2 /* toggle property */</PRE
></TD
></TR
></TABLE
><P
> See also the implementation notes on <A
HREF="x216.html#URGENCY"
>urgency</A
> and <A
HREF="x216.html#NORESIZE"
>fixed size windows</A
>.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN182"
>_NET_WM_STRUT</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_WM_STRUT, CARDINAL[4]/32</PRE
></TD
></TR
></TABLE
><P
>This property MUST be set by the Client if the window is to reserve space at
the edge of the screen. The property is a 4-tupel of cardinals, one for each
border of the screen. The order of the borders is left, right, top, bottom.
The client MAY change this property anytime, therefore the Window Manager MUST
watch out for property notify events.
</P
><P
>The purpose of struts is to reserve space at the borders of the desktop. This
is very useful for a docking area, a taskbar or a panel, for instance. The
window manager should know about this reserved space in order to be able to
preserve the space. Also maximized windows should not cover that reserved
space.
</P
><P
>Rationale: A simple "do not cover" hint is not enough for dealing with e.g.
auto-hide panels.
</P
><P
>Notes: An auto-hide panel SHOULD set the strut to be its minimum, hidden size.
A "corner" panel that does not extend for the full length of a screen border
SHOULD only set one strut.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN189"
>_NET_WM_ICON_GEOMETRY</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_WM_ICON_GEOMETRY, CARDINAL[4]</PRE
></TD
></TR
></TABLE
><P
>An array of x,y,w,h of type CARDINAL, format 32. This optional property MAY
be set by standalone tools like a taskbar or an iconbox. It specifies the
geometry of a possible icon in case the window is iconified.
</P
><P
>Rationale: This makes it possible for a window manager to display a nice
animation like morphing the window into its icon.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN194"
>_NET_WM_ICON</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_WM_ICON CARDINAL[][2+n]/32</PRE
></TD
></TR
></TABLE
><P
>This is an array of possible icons for the client. This specification does
not stipulate what size these icons should be, but individual desktop
environments or toolkits may do so. The Window Manager MAY scale any of these
icons to an appropriate size.
</P
><P
>This is an array of 32bit packed CARDINAL ARGB with high byte being A, low
byte being B. First two bytes are width, height. Data is in rows, left to
right and top to bottom.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN199"
>_NET_WM_PID</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_WM_PID CARDINAL/32</PRE
></TD
></TR
></TABLE
><P
>If set, this property MUST contain the process ID of the client owning this
window. This MAY be used by the Window Manager to kill windows which do not
respond to the _NET_WM_PING protocol.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN203"
>_NET_WM_HANDLED_ICONS</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_WM_HANDLED_ICONS</PRE
></TD
></TR
></TABLE
><P
>This property can be set by clients to indicate that the Window Manager need
not provide icons for iconified windows, for example if the client is a taskbar
and provides buttons for iconified windows.
</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x123.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x207.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Other Root Window Messages</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Window Manager Protocols</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

173
wm-spec/x207.html Normal file
View file

@ -0,0 +1,173 @@
<HTML
><HEAD
><TITLE
>Window Manager Protocols</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
REL="HOME"
TITLE="Extended Window Manager Hints"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Application Window Properties"
HREF="x137.html"><LINK
REL="NEXT"
TITLE="Implementation notes"
HREF="x216.html"></HEAD
><BODY
CLASS="SECT1"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Extended Window Manager Hints</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x137.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x216.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN207"
>Window Manager Protocols</A
></H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN209"
>_NET_WM_PING</A
></H2
><P
>This protocol allows the Window Manager to determine if the Client is still
processing X events. This can be used by the Window Manager to determine if a
window which fails to close after being sent WM_DELETE_WINDOW has stopped
responding, or has stalled for some other reason, such as waiting for user
confirmation. A Client SHOULD indicate that it is willing to participate in
this protocol by listing _NET_WM_PING in the WM_PROTOCOLS property of the
client window.
</P
><P
>A Window Manager can use this protocol at any time by sending a client message
as follows:
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>type = ClientMessage
window = &#60;client window&#62;
message_type = WM_PROTOCOLS
format = 32
data.l[0] = _NET_WM_PING
data.l[1] = &#60;timestamp&#62;</PRE
></TD
></TR
></TABLE
><P
>A participating Client receiving this message MUST send it back to the root
window immediately, by setting window = root, and calling XSendEvent. The
Client MUST NOT alter the timestamp, as this can be used by the Window Manager
to uniquely identify the ping.
</P
><P
>The Window Manager MAY kill the Client (using _NET_WM_PID) if it fails to
respond to this protocol within a reasonable time.
</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x137.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x216.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Application Window Properties</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Implementation notes</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

231
wm-spec/x216.html Normal file
View file

@ -0,0 +1,231 @@
<HTML
><HEAD
><TITLE
>Implementation notes</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
REL="HOME"
TITLE="Extended Window Manager Hints"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Window Manager Protocols"
HREF="x207.html"></HEAD
><BODY
CLASS="SECT1"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Extended Window Manager Hints</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x207.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
>&nbsp;</TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN216"
>Implementation notes</A
></H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN218"
>Desktop/workspace model</A
></H2
><P
>This spec assumes a desktop model that consists of one or more completely
independent desktops which may or may not be larger than the screen area.
When a desktop is larger than the screen it is left to the window manager if
it will implement scrolling or paging.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN221"
>File Manager desktop</A
></H2
><P
>This spec suggests implementing the file manager desktop by mapping a
desktop-sized window (no shape) to all desktops, with
_NET_WM_WINDOW_TYPE_DESKTOP. This makes the desktop focusable and greatly
simplifies implementation of the file manager. It is also faster than
managing lots of small shaped windows. The file manager draws the background
on this window. There should be a root property with a window handle for use
in applications that want to draw the background (xearth).
</P
><P
>Several GNOME file manager developers have accepted this model
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN225"
>Implementing enhanced support for application transient windows</A
></H2
><P
>If the WM_TRANSIENT_FOR property is set to None or Root window, the window
should be treated as a transient for all other windows in the same group. It
has been noted that this is a slight ICCCM violation, but as this behaviour is
pretty standard for many toolkits and window managers, and is extremely
unlikely to break anything, it seems reasonable to document it as standard.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="URGENCY"
>Urgency</A
></H2
><P
> Dialog boxes should indicate their urgency level (information or warning) using the urgency bit in the WM_HINTS.flags property, as defined in the ICCCM.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="NORESIZE"
>Fixed size windows</A
></H2
><P
> Windows can indicate that they are non-resizable by setting minheight = maxheight and minwidth = maxwidth in the ICCCM WM_NORMAL_HINTS property. The Window Manager MAY decorate such windows differently.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN234"
>Pagers and Taskbars</A
></H2
><P
> This specification attempts to make reasonable provisions for WM independant pagers and taskbars. Window Managers that require / desire additional functionality beyond what can be acheived using the mechanisms set out in this specification may choose to implement their own pagers, which communicates with the Window Manager using further, WM-specific hints, or some other means.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN237"
>Window Movement</A
></H2
><P
>According to the ICCCM, applications should not see unnecessary differences
between running with or without a window manager. Therefore window movements
for already mapped windows, such as ones requested by XMoveWindow(Display,
Window, X, Y) have to move the window Window to the coordinates (X, Y) and not
cause the window's window manager frame window to end up at (X, Y).
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN240"
>Window-in-Window MDI</A
></H2
><P
> The authors of this specification acknowledge that there is no standard method to allow the Window Manager to manage windows that a part of a Window-in-Window MDI application. Application authors are advised to use some other form of MDI, or to propose a mechanism to be included in the next revision of this specification.
</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x207.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>&nbsp;</TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Window Manager Protocols</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>&nbsp;</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

429
wm-spec/x71.html Normal file
View file

@ -0,0 +1,429 @@
<HTML
><HEAD
><TITLE
>Root Window Properties (+Related Messages)</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
REL="HOME"
TITLE="Extended Window Manager Hints"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Extended Window Manager Hints"
HREF="index.html"><LINK
REL="NEXT"
TITLE="Other Root Window Messages"
HREF="x123.html"></HEAD
><BODY
CLASS="SECT1"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Extended Window Manager Hints</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="index.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x123.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN71"
>Root Window Properties (+Related Messages)</A
></H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN73"
>_NET_SUPPORTED</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_SUPPORTED, ATOM[]/32</PRE
></TD
></TR
></TABLE
><P
>This property MUST be set by the Window Manager to indicate which hints it
supports. This assumes that backwards incompatible changes will not be made
to the hints (without being renamed).
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN77"
>_NET_CLIENT_LIST</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_CLIENT_LIST, XA_WINDOW[]/32
_NET_CLIENT_LIST_STACKING, XA_WINDOW[]/32</PRE
></TD
></TR
></TABLE
><P
>An array of all X Windows managed by the Window Manager. _NET_CLIENT_LIST has
mapping order. _NET_CLIENT_LIST_STACKING has stacking order. This property
SHOULD be set and updated by the Window Manager.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN81"
>_NET_NUMBER_OF_DESKTOPS</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_NUMBER_OF_DESKTOPS, CARDINAL/32</PRE
></TD
></TR
></TABLE
><P
>This property SHOULD be set and updated by the Window Manager to indicate the
number of virtual desktops.
</P
><P
>A Pager can insert or delete a certain desktop by sending a
_NET_{INSERT/DELETE}_DESKTOP client message to the root window.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN86"
>_NET_DESKTOP_GEOMETRY</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_DESKTOP_GEOMETRY width,height, CARDINAL[2]/32</PRE
></TD
></TR
></TABLE
><P
>Array of two cardinals that defines the width and height of each desktop in
pixels. This property SHOULD be set by the Window Manager.
</P
><P
>A Pager can change the desktop geometry by sending a _NET_DESKTOP_GEOMETRY client
message to the root window
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN91"
>_NET_DESKTOP_VIEWPORT</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_DESKTOP_VIEWPORT x,y, CARDINAL[][2]/32</PRE
></TD
></TR
></TABLE
><P
>Array of two cardinals that define the top left corner of the current view in
pixel, for each desktop. For window managers that don't support paged
desktops, this MUST always be set to (0,0).
</P
><P
>A Pager can change the viewport for the current desktop by sending a
_NET_DESKTOP_VIEWPORT client message to the root window
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN96"
>_NET_CURRENT_DESKTOP</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_CURRENT_DESKTOP &#60;desktop&#62;, CARDINAL[1]/32</PRE
></TD
></TR
></TABLE
><P
>The index of the current desktop, starts with desktop 0. This MUST be set and
updated by the Window Manager If a Pager wants to switch to another virtual
desktop, it MUST send a _NET_CURRENT_DESKTOP client message to the root window
(type _NET_CURRENT_DESKTOP, format 32, l[0]=&#60;new index&#62;)
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN100"
>_NET_DESKTOP_NAMES</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_DESKTOP_NAMES</PRE
></TD
></TR
></TABLE
><P
>The names of all virtual desktops in UTF8 encoding. This property MAY be
changed by a Pager or the Window Mangaer at any time. When a desktop is added
or removed, the Window Manager MUST update this list.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN104"
>_NET_ACTIVE_WINDOW</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_ACTIVE_WINDOW, WINDOW/32</PRE
></TD
></TR
></TABLE
><P
>The window handle of the currently active window. This is a read-only
property set by the Window Manager. This is a read-only property set by the
window manager. If a client (for example, a taskbar) wants to activate
another window, it MUST send a _NET_ACTIVE_WINDOW client message to the root
window (type _NET_ACTIVE_WINDOW, format 32, l[0]=0
/* may be used later */, window is the respective client window)
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN108"
>_NET_WORKAREA</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_WORKAREA, CARDINAL[][4]/32
</PRE
></TD
></TR
></TABLE
><P
> This property MUST be set by WM upon calculating the work area for each desktop (the first quadruple = desktop 1). Contains the left, right, top, bottom co-ordinates for each desktop. Work area SHOULD be used by desktop applications to place desktop icons apropriately.
</P
><P
> The window manager SHOULD calculate this space by taking the current page minus space occupied by dock and panel windows, as indicated by the <A
HREF="x137.html#NETWMSTRUT"
>_NET_WM_STRUT</A
> property set on client windows.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN114"
>_NET_SUPPORTING_WM_CHECK</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_SUPPORTING_WM_CHECK, XA_WINDOW/32</PRE
></TD
></TR
></TABLE
><P
>The Window Manager MUST set this property on the root window to be the ID of a child window created by the WM, to indicate that a compliant WM is active. The child window MUST also have the _NET_SUPPORTING_WM_CHECK property set with the same value. The child window MUST also have the _NET_WM_NAME property set to the name of the Window Manager.
</P
><P
>Rationale: The child window is used to guard against stale properties being left on the root window by a crashed WM.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN119"
>_NET_VIRTUAL_ROOTS</A
></H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>_NET_VIRTUAL_ROOTS, XA_WINDOW[]/32</PRE
></TD
></TR
></TABLE
><P
>The Window Manager MUST set this to a list of IDs for windows that are acting as virtual root windows. To implement virtual desktops, some window managers reparent client windows to a child of the root window. The property is present so that Pagers can determine which windows to watch for substructure notifies.
</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="index.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x123.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Extended Window Manager Hints</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Other Root Window Messages</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>