[comp.windows.x] Which window manager is right?

lee%hhb@PRINCETON.EDU (lee daniels) (08/22/88)

I have a situation where I create a new window, I resize it and then I show
it, in that order.  When I create the window, I do not know what default
size I want it to be so I just make it 100x100 and then resize it when I
know better.

The problem is that under awm and twm I get a 100x100 default window and
under uwm I get a window the size that I want.  Since I do not show the
window until after it has been resized properly, I believe uwm is right.

Am I correct on my assumption and if so why are twm and awm not picking up
on the fact that the window has changed size?

--

Lee Daniels			(201) 848-8000
HHB Systems
1000 Wyckoff Avenue,		uucp path:  princeton!hhb!lee@uunet.uu.net
Mahwah, New Jersey  07430

berman@EDSEL.SIEMENS.COM (A. Michael Berman) (08/27/88)

>I have a situation where I create a new window, I resize it and then I show
>it, in that order.  When I create the window, I do not know what default
>size I want it to be so I just make it 100x100 and then resize it when I
>know better.

I assume what you are doing is the following:

	XCreateSimpleWindow(...,...,...,...,100,100,....)
	XResizeWindow() or XConfigureWindow
	XMapWindow

>The problem is that under awm and twm I get a 100x100 default window and
>under uwm I get a window the size that I want.  Since I do not show the
>window until after it has been resized properly, I believe uwm is right.

>Am I correct on my assumption and if so why are twm and awm not picking up
>on the fact that the window has changed size?

If what you are doing is what is shown above, there is no
reason why it should not work, except that awm and twm may be
ignoring configure requests from unmapped windows.  A quick
check of the awm code suggests the following: 
	-- awm keeps a list of the windows that it knows about
	-- the way a window gets into the list is by being
		mapped for the first time
	-- when a ConfigureRequest is redirected to awm, it
	   ignores it if it doesn't know about the window.

I was all set to tell you that our RTL Tiled Window Manager
does it right, but fortunately I looked at the code first :-)
It turns out we do essentially the same thing awm does.  We
expect the application to change its size using WmNormalHints
and otherwise use the original size.  This really isn't right;
in fact, the current draft for the Inter-Client Communication
Conventions Manual proposes that the x,y,height,width fields
be removed from WmNormalHints.  Anyway, I'm making a one-line
patch to rtl that should make it work correctly with an
application such as yours, by honoring the ConfigureRequest.
I assume that once Jordan and Tom hear about this they will be
able to make similar adjustments.  Thanks very much for
pointing this out.

--Mike