[comp.windows.x] Transient shell widgets

dheller@cory.Berkeley.EDU (Dan Heller) (08/24/88)

I posted this a couple days ago, but no one replied or followed up,
so I assume it didn't make it (I usually get quite a few very helpful
responses from folks -- please keep it up :-)
-------------------------

I know that there was once a discussion about this several weeks ago,
but I missed the outcome of the discussion (if anything was resolved).
For some reason, transient shell widgets are always positioned at 0,0
on the display regardless of any and all efforts attempting to create
or move them to other places.

There was a program posted about the same time which demonstrated how one
would use popup shells and it was very helpful, but it used an override
shell widget.  If you simply rename it to use the transient shell widget,
then you'll see the problem I'm describing -- the shell is mapped at 0 0
rather than the position indicated.

In an attempt to see a program which used transient shell widgets, I
did a grep in the contrib tree (as distributed by the source we received)
and found that "xman" was the only program which tried to make use of it.
So, I ran the program and got the transient shell to come up -- and guess
where it mapped itself?  You got it --

I really need to know what the reason for this is and try to fix it
because it is appearing to cause other windows to do the same thing!

Consider the following...

I have a main application which contains a basic "core" widget (to draw
graphics into) and a widget above it which has a callback to display an
RLTMenu-type menu.  One of the items in that menu will call a function
to create a popup widget of type transient or override shell widget ...
This widget contains a box widget which contains two label widgets, and a
command widget.

Everythng acts as described: the transient shell appears at 0,0 if it
gets created (e.g. you have to select the menu item).  However, the thing
that really is ruining things is that if I have this transient shell widget
contain a particular widget type (which I wrote, but it's similar to the
viewport widget), then when the main application gets created and mapped
onto the screen, that *application* gets mapped to 0,0!  HUH!?

I haven't even called XtPopup or anything yet.  I did an XtCreatePopup...
but haven't realized it or used any routines which reference it or any of
its children.  Note, this *only* happens if this transient shell contains
this special widget once..  How can *anything* inside of a transient shell
widget cause the main application to be physically moved to 0,0?

This is why I'm suspicious that whatever is causing the transient shell
to get mapped to 0,0 regardless of all efforts otherwise is affecting
other widgets.



Dan Heller	<island!argv@sun.com>