[comp.windows.x] WM_CLASS vs WM_NAME standard property

ellis@audi.mit.EDU (Ellis Cohen) (07/30/87)

We strongly believe that the semantics of the WM_NAME standard property
should be changed and that a separate WM_CLASS property should be used.
Our understanding (from earlier discussions with Jim Gettys) was that
this would be done, but the Beta draft of Xlib did not incorporate this
change.

We have been trying unsuccessfully to contact hania@decwrl about this
problem for over a month without being able to get this problem resolved.
At this point, we feel that we need to contact both xbeta sites and the
xpert list in general since the problem is a serious one for us, and
perhaps for other window manager writers as well.

------------------------------------------------------------

Section 9.1 indicates that WM_NAME is meant to be the "name of the
application".  Window managers in general (and in particular, the wm
manager distributed on the beta tape) put WM_NAME in the window header.

It is clear that WM_NAME is (occasionally) expected to be long,
since the standard property WM_ICON_NAME is also specified, which
presumably is a shorter name suitable for an icon.

Here's what I think will happen in practice.  Since window managers will
tend to place the contents of WM_NAME in the window header, application
writers will use WM_NAME for informational purposes.  This has happened
in every other window manager I know of, and it is clearly what both
users and application writers actually want.

I am proposing that we recognize this reality and specify that WM_NAME be
simply used as a window title and that WM_ICON_NAME be simply used as an
icon title, and that they have no other semantic significance.

------------------------------------------------------------

Now, there is a reason for windows to have a separate WM_CLASS property.  

WM_CLASS should contain the window class.  This generally, but not
necessarily, is the name of the application.  For example, applications
which open more than one top level window may wish window managers to
treat the windows differently, which they can do by giving them
different window classes.

The Siemens RTL Tiled Window Manager uses WM_CLASS to obtain default
window properties from a defaults file.  We would expect other window
managers to do the same.

The complete list of class-related properties for our window manager is
quite long.  They include such things as:

    - Whether the window can be automatically closed by the manager
    - Whether the window can be automatically shrunk by the manager
    - How to respond to client resizes and reconfigures
    - Whether the manager should avoid causing expose events on the window

------------------------------------------------------------

In conclusion:
    WM_NAME should simply be a semantic-free window title, potentially
        changed (even frequently) during execution.
    WM_ICON_NAME (if available) is used instead of WM_NAME in an icon.
    WM_CLASS is a window class (often the application name), and should
        not be changed.

Ellis Cohen
Siemens RTL Tiled Window Manager Project
ellis.cohen@a.gp.cs.cmu.edu
(609) 734-65o py Ina