[comp.windows.x] WM_STATE property

rls@lookout.uswest.COM (01/03/90)

The ICCCM Manual ( Draft 25th Feb 1988 )  stated in section 4.1.3.1
that the window manager places certain properties on a client's
top level window.  One of these is WM_STATE which is modified when
the window mgr changes the window state, eg., after iconfication.

I cannot find any mention of WM_STATE in any of the header files
under R3 or in the source code for uwm. Was it not implemented
by uwm?  Is it used by any of the window managers?  Is there
another way to determine if a window is iconified?  This is needed
by a client other than the one that originally created the window
of interest, so receiving an event won't work...

			

jim@EXPO.LCS.MIT.EDU (Jim Fulton) (01/03/90)

    I cannot find any mention of WM_STATE in any of the header files
    under R3 or in the source code for uwm.

There was no direct support for the draft ICCCM in R3, either in uwm or Xlib.
And, since the contents of WM_STATE are subject to change, there will be no
Xlib calls or data structures for that particular property in R4 (window
managers simply call XGetWindowProperty and XChangeProperty).

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

    I cannot find any mention of WM_STATE in any of the header files
    under R3 or in the source code for uwm. Was it not implemented
    by uwm?

No, it wasn't.

    Is it used by any of the window managers?

Yes, by several ICCCM-friendly window managers in R4.  But note that the
ICCCM standard says "In general, clients should not need to examine the
contents of this property".  Only "utility" programs like xprop should
need to do this.

    Is there another way to determine if a window is iconified?

From the ICCCM standard (Section 4.1.4): "Once a client's non-override-redirect
top-level window has left Withdrawn state, the client will know that the window
is in Normal state if it is mapped, and that the window is in Iconic state if
it is not mapped.  It may select for StructureNotify on the top-level window,
and it will receive an UnmapNotify event when it moves to Iconic state, and a
MapNotify when it moves to Normal state."

    This is needed
    by a client other than the one that originally created the window
    of interest, so receiving an event won't work...

Another client can certainly select for StructureNotify events, but it can
also use XGetWindowAttributes for a one-shot look at the mapped state.