[comp.windows.x.motif] Need help with Motif application running under olwm

davidf@HQ.Ileaf.COM (David Fristrom) (06/06/91)

I have been working on a Motif 1.1.2 application, and unfortunatly one
of our customers will be running it on Sun Sparcs under the Open Look
Window Manager (olwm).  Unfortunate, because it has introduced us to
the wonderful world of window manager incompatibilites.  I'm hoping
other people might have encountered (and solved) these problems, and
can offer some advice.  I apologize if this subject has already been
covered on the net; I have only recently started reading this group.

I am currently grappling with two problems:

1) When you iconify an application window, any dialog windows
belonging to the application are supposed to be unmapped.  According
to my documentation, for well-behaved window managers you indicate you
want this behavior by setting the WM_TRANSIENT_FOR property on the
dialog windows (which Motif does for you automatically if you use the
right kind of shell widget for the dialog).  

For olwm, setting WM_TRANSIENT_FOR doesn't produce the desired effect.
However, for Open Look applications the dialogs are correctly removed,
so there must be some way to tell the olwm what to do.  Looking at the
window attributes on the Open Look windows, I see that there is a
OL_WM_ATTR, and my guess is that the information is coming from there.
However, I haven't been able to find out what the format of the
OL_WM_ATTR is.  Anybody out there know how to make this work?

2) In my application there is a standard Motif radio box with two
standard toggle buttons.  When running under olwm (and as far as I can
tell, *only* when running under olwm), the first time you click on a
toggle its internal state is correctly toggled, but its appearance is
not.  Thus, you are left with what appears to be two radio buttons,
both of which are off (although internally, one is in fact set).  If
you force a refresh, the display is fixed and one is now revealed to
be on.  If after the first click you click again on the same toggle,
now that it has the focus, the display is correct.  The problem only
appears when you first click on a toggle after the focus has been
elsewhere. 

I'm not quite sure how a window manager could cause this behavior even
if it wanted to, but since it only occurs when running with olwm it
would seem to be some interaction between Motif and the window
manager.  Has anybody ever encountered this before, and more
importantly does anybody have a fix?

Thanks in advance for any assistance.

David Fristrom		|	
Interleaf, Inc.		|
davidf@ileaf.com	|

nazgul@alfalfa.com (06/09/91)

> For olwm, setting WM_TRANSIENT_FOR doesn't produce the desired effect.
> However, for Open Look applications the dialogs are correctly removed,
I believe this is supposed to be fixed in OW3.0.  In the meantime I
just made my dialogs all watch for iconization events on the main
window and go away when it did.

> 2) In my application there is a standard Motif radio box with two
> standard toggle buttons.  When running under olwm (and as far as I can
> tell, *only* when running under olwm), the first time you click on a
> toggle its internal state is correctly toggled, but its appearance is
> not.  Thus, you are left with what appears to be two radio buttons,
Yep.  God awful pain.  And it doesn`t happen if you programmatically
change the state, only if you do it with the mouse.  (Keyboard works
fine too).  You'll also find that OLWM often sends events to the
wrong buttons and and windows when you click, and that save under
does not work properly and often leaves garbage on the screen.

When I asked about these things on the net everyone pretty 
consitently said "Why on earth are you using Sun's software?".
Which would be pretty amusing, if it weren't for the fact that
our customers aren't quite so resourceful.


Alfalfa Software, Inc.          |       Poste:  The EMail for Unix
nazgul@alfalfa.com              |       Send Anything... Anywhere
617/646-7703 (voice/fax)        |       info@alfalfa.com

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

dbrooks@osf.org (06/11/91)

You wrote:

> When I asked about these things on the net everyone pretty 
> consitently said "Why on earth are you using Sun's software?".
> Which would be pretty amusing, if it weren't for the fact that
> our customers aren't quite so resourceful.

Groan.  Some people wouldn't recognize the real world if you <insert your
favorite brick simile>

David