[comp.windows.x] Transient Shells and AWM

urban@spp2.UUCP (Michael Urban) (07/02/88)

If I use the Xt toolkit to create a Transient pop-up shell,
AWM insists on performing "rubber-banding" (calling AskUser),
because the USPosition and USsize hints are not both set;
however, the Shell widget does not set these hints unless
a "geometry" resource is supplied for the pop-up shell, even
if size and location information is supplied (or, as in my case,
location is supplied and the size is determined by the Shell's
contents).

Which of the three participants (awm, Shell(Xt), my application)
should be changed?
-- 
   Mike Urban
	...!trwrb!trwspp!spp2!urban 

"You're in a maze of twisty UUCP connections, all alike"

dheller@cory.Berkeley.EDU (Dan Heller) (07/05/88)

In article <350@algol.spp2.UUCP> urban@spp2.UUCP (Mike Urban) writes:
>If I use the Xt toolkit to create a Transient pop-up shell,
>AWM insists on performing "rubber-banding" (calling AskUser),
>because the USPosition and USsize hints are not both set;

>Which of the three participants (awm, Shell(Xt), my application)
>should be changed?
>   Mike Urban
>	...!trwrb!trwspp!spp2!urban 

I fixed this by setting the override_redirect flag to true in the
window attributes structure.  Awm works fine in this context.

However, there is still a problem with destroying this shell.
In the transient shell that I created, I placed a number of widgets,
one of which is a "quit" command button which merely calls
XtDestroyWidget() on the transient shell widget.  The next call to
XtNextEvent tries to do the second phase of the destruction process
and core dumps deep within Xlib ... The only work around I can come
up with is not destroying the widget, but unmapping it instead. This
is bad because I can't free all the memory and resources it consumes.

the question is, what's wrong with destroying a transient shell?
Dan Heller	<island!argv@sun.com>

dshr@SUN.COM (David Rosenthal) (07/05/88)

It seems pretty clear to me that AWM is wrong.  Asking the user
to rubber-band out the space for a transient window,  which is
intended to be something like a dialog box,  has to be wrong.
Would you want to be interrupted in order to stroke out the
space in which an application was to ask you "OK to exit?"

I cannot understand why any window manager would ask the
user to interactively size any WM_TRANSIENT_FOR window,
irrespective of the setting of the USPosition or USSize hints.
I would be prepared to forbid this in the Inter-Client Communication
Conventions Manual.

Using override-redirect on Transient pop-ups is definitely
wrong.

	David.

ellis@AUDI.SIEMENS.COM (Ellis Cohen) (07/05/88)

> In article <350@algol.spp2.UUCP> urban@spp2.UUCP (Mike Urban) writes:
> >If I use the Xt toolkit to create a Transient pop-up shell,
> >AWM insists on performing "rubber-banding" (calling AskUser),
> >because the USPosition and USsize hints are not both set;
> 
> >Which of the three participants (awm, Shell(Xt), my application)
> >should be changed?
> >   Mike Urban
> >	...!trwrb!trwspp!spp2!urban 
> 
> I fixed this by setting the override_redirect flag to true in the
> window attributes structure.  Awm works fine in this context.

Please do not set encourage application writers to set override_redirect
on transient windows.

Override_redirect windows are meant to be invisible to window
managers.  They should only be used for extremely short-lived
windows like pop-up menu.

Transient windows typically have longer lifetimes.  Many window
managers will provide decorations for transient windows so that
the user can move them around.  Setting override_redirect
defeats that goal.

My gut feeling is that awm should put the transient window up
at the size and position requested.

Ellis Cohen
Siemens RTL

jkh@ardent.UUCP (07/06/88)

It's not apparent to me that awm *is* asking to confirm transient popup windows.
xmh, for example, pops up confirm boxes all over the place (for me) under
awm without any rubberbanding. That's not to say that there isn't a subtle bug
lurking in awm somewhere (for which I will look) that causes this not to
happen on occasion, but just to set the record straight, it's not (and never
has been) awm's intention to interfere with transient windows. I don't need
an ICCCM spec to know that.

					Jordan

obrien@anpiel.aero.org (Michael O'Brien) (07/06/88)

In article <8807051604.AA02096@devnull.sun.com> dshr@SUN.COM (David Rosenthal) writes:
>
>Using override-redirect on Transient pop-ups is definitely
>wrong.

I'm prepared to believe this, but I think it interesting that
in X.V11R2, the "bitmap" program does exactly this.  I recently reamed
that program to provide some additional capability (don't ask for
it - it's specific work for a project and useless in general) and
had a whole bunch of trouble until I turned that bit off.  Of
course, it also doesn't say TRANSIENT anything.  I have a suspicion
that the "bitmap" code is very early X stuff.
--
Mike O'Brien
obrien@aerospace.aero.org
{sdcrdcf,trwrb}!aero!obrien