[comp.windows.x] WMNormalHints and ICCCM: what is the window manager supposed to do ?

salem@THINK.COM (06/21/89)

It seems clear that if the client specifies the USPosition and USSize flags
in the WM_NORMAL_HINTS property that the window manager should not query
the user for the window's size or position before mapping it.

However, it is unclear to me from the ICCCM what is the correct action for
a window manager to take regarding the PPosition and PSize flags.  If
PPosition and PSize are specified, should the window manager query the user
for the window's size and position ?

uwm does the query, twm doesn't.

I would like to specify a default size and position for the window but
allow the user to override them as the window is being mapped.  What is the
correct way to specify this behavior ?

-- jim
salem@think.com

rws@EXPO.LCS.MIT.EDU (06/21/89)

    If PPosition and PSize are specified, should the window manager query the
    user for the window's size and position ?

The ICCCM places no constraints on this policy decision.

    I would like to specify a default size and position for the window but
    allow the user to override them as the window is being mapped.  What is the
    correct way to specify this behavior ?

Too early in the morning, I guess, I don't understand the question.

salem@THINK.COM (06/22/89)

   From: rws@expo.lcs.mit.edu
   Date: Wed, 21 Jun 89 08:12:13 -0400

       If PPosition and PSize are specified, should the window manager query the
       user for the window's size and position ?

   The ICCCM places no constraints on this policy decision.

       I would like to specify a default size and position for the window but
       allow the user to override them as the window is being mapped.  What is the
       correct way to specify this behavior ?

   Too early in the morning, I guess, I don't understand the question.

I'll try again.

How do I inform the window manager that it should allow the user a chance to
reposition or resize the window ?

The WM_NORMAL_HINTS appear to control this behavior.

In uwm, I must specify no flags or just the PPosition or PSize flags.
In twm, I must specify no flags.

Which is correct ?  Or is this outside the scope of ICCCM ?  If it is
outside the scope, I encourage that it be taken up in a future draft.

My client has a preferred position and size.  Therefore, it seems natural
to specify the PPosition and PSize flags.  However, I do NOT want the
window manager to place the window without giving the user a chance to
resize and reposition it.  twm doesn't allow this functionality.

-- jim

jim@EXPO.LCS.MIT.EDU (Jim Fulton) (06/22/89)

> How do I inform the window manager that it should allow the user a chance to
> reposition or resize the window ?
> 
> The WM_NORMAL_HINTS appear to control this behavior.
> 
> In uwm, I must specify no flags or just the PPosition or PSize flags.
> In twm, I must specify no flags.

The R4 twm only looks at the USPosition flag in the normal hints.

Your application should feel free to set PPosition and PSize as it sees fit.
The window manager is free to use or ignore them.  I would suspect that many
window managers will use PPosition and PSize as defaults, but allow some
sort of interactive prompting.


>                                            However, I do NOT want the
> window manager to place the window without giving the user a chance to
> resize and reposition it.  twm doesn't allow this functionality.

Fixed in R4.  I don't have an R3 twm, but you can probably fix it in add_window
pretty easily.