12.3 Communicating with the Window Manager

To permit window managers to perform their role of mediating the competing demands for screen space and colormaps, the clients being managed must adhere to certain conventions. These conventions specify things that clients must do, things they should or can do if desired, and things that they must not do. The most basic thing clients are expected to do is to set certain properties so that the window manager has information on which to base its decisions.

It is a fundamental principle of client-window manager communication that a general client should not care which window manager is running or, indeed, if one is running at all. The choice of window manager is up to the user or perhaps the system administrator, not the client.

The fact that window managers need information about the clients they are managing and yet that window managers vary and might not be running lead to the concept of the hint. A hint is a suggestion to the window manager about a preference of the application made by setting a property. Xlib makes this easy by providing routines that conveniently set the right properties. The window manager is encouraged to honor as many of the hints as possible, but it is not required to honor any of them. Therefore, the application must not depend on its hints being honored; it must be capable of operating when any of its hints are ignored or denied.[49]

In general, the object of the X11 design is that clients should, as far as possible, ...

Get XLIB Programming Manual, Rel. 5, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.