[comp.windows.x] some ICCCM questions

werner@nikhefk.UUCP (Werner Vogels) (03/21/90)

A few ICCCM questions from my students:

1)  ICCCM suggests that WM_TRANSIENT_FOR windows are children of the root.
    We encountered this suggestion several times in other places but never 
    a statement that they must be children of the rootwindow. What are the
    propeties of this kind of window and what are the requirments for handling
    them?

2)  According to ICCCM for each window only once a SubstructureRedirect or 
    a ResizeRedirect can be asked and only on windows that are 
    owned. What means owning a window in this context and what consequences
    are there for the windowmanager ?

3)  ICCCM suggests that a client should receive all button and keyevents on
    the window from him or her that has the focus even if the windowmanager
    has placed a grab on some keys or buttons. Does this mean that the 
    windowmanager has to send all events further to the client or only those
    where no grab exists for ?


Werner H.P. Vogels

Software Expertise Centrum                      
Haagse Hogeschool, Intersector Informatica     tel: +31 70 618419
Louis Couperusplein 2-19, 2514 HP Den Haag     E-mail: werner@nikhefk.nikhef.nl
The Netherlands                                     or werner@hhinsi.uucp

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (03/23/90)

    ICCCM suggests that WM_TRANSIENT_FOR windows are children of the root.
    We encountered this suggestion several times in other places but never 
    a statement that they must be children of the rootwindow.

They are "top-level" windows.  They must start out as children of the root.
The WM can reparent them.  (For example, we have toyed with the idea of
reparenting transients to be children of the "main" window's WM frame, as
one kind of (restrictive) policy.)

    What are the
    propeties of this kind of window and what are the requirments for handling
    them?

This is stated, as (im)precisely as is reasonable, in the ICCCM.  Dialog boxes
are one example.

    According to ICCCM for each window only once a SubstructureRedirect or 
    a ResizeRedirect can be asked and only on windows that are 
    owned.

Yes, this is a restriction of the X protocol.

    What means owning a window in this context and what consequences
    are there for the windowmanager ?

The simplest rule is that the client that created the window owns it.

    ICCCM suggests that a client should receive all button and keyevents on
    the window from him or her that has the focus even if the windowmanager
    has placed a grab on some keys or buttons. Does this mean that the 
    windowmanager has to send all events further to the client or only those
    where no grab exists for ?

The basic requirement is that the window manager should provide a way of
sending an event from any key on the keyboard (or button on the pointer)
to the client window, except for those keys specifically labelled for
window manager functions.  In normal situations this will happen
automatically.  The major conflict is with passive grabs.  The ICCCM
suggest a way for the window manager to provide a "quoting" mechanism
for passing through keys that have been grabbed.