[comp.windows.x] Question About Poor Interaction Between Mwm and XView Applications

drapeau@sioux.Stanford.EDU (George Drapeau) (03/04/91)

My group has written several applications using the XView toolkit.
Our applications tend to set up default initial placements for their
windows (i.e., they set XV_X and XV_Y attributes).

When we run these applications under control of the OPEN LOOK Window
Manager (olwm), the placement hints are followed as we would hope --
the applications' windows appear where we specified in the code.

However, when we run the same XView-written applications under the
control of the Motif Window Manager (mwm), Mwm does not "listen" to
the XView applications' placement requests.

My question is, whose fault is this and when will it be fixed either
by Sun or by the OSF?  (yeah right, like that's not too much to ask)

I haven't had the chance to look into the source for either of the
culprits to see which hints the apps and wm's set and look at, so any
help here would be much appreciated.  Also, if anybody knows the
philosophy behind whatever decisions were made in how to set/take
placement requests, I'd love to hear about it.

Thanks in advance,

	George
--
______________________________________________________________________________
George D. Drapeau			Internet: drapeau@jessica.stanford.edu
Academic Information Resources
Stanford University

rick@pbi.COM (Richard M. Goldstein) (03/04/91)

	My group has written several applications using the XView toolkit.
	Our applications tend to set up default initial placements for their
	windows (i.e., they set XV_X and XV_Y attributes).

	However, when we run the same XView-written applications under the
	control of the Motif Window Manager (mwm), Mwm does not "listen" to
	the XView applications' placement requests.

I have found XV_X and XV_Y to be generally unreliable for the
placement of Frames in XView.  The work-around seems to be
using the rect->r_left and rect->r_top from the frame's 
WIN_RECT attribute.  See p. 70 of the XVPM.

hope this helps

rick

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                %
% Richard M. Goldstein                           %
%                                                %
% Perfect Byte, Inc.       Phone:  (402)554-1122 %
% 7121 Cass St.            Fax:    (402)554-1938 %
% Omaha, NE 68132          email:  rick@pbi.com  %
%                                                %
% "If I knew what I was doing,                   %
%       d'ya think I'd be in Omaha?"             %
%                                                %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

drapeau@sioux.Stanford.EDU (George Drapeau) (03/05/91)

In article <DRAPEAU.91Mar3184436@sioux.Stanford.EDU> drapeau@sioux.Stanford.EDU I write:

   My group has written several applications using the XView toolkit.
   Our applications tend to set up default initial placements for their
   windows (i.e., they set XV_X and XV_Y attributes).

   When we run these applications under control of the OPEN LOOK Window
   Manager (olwm), the placement hints are followed as we would hope --
   the applications' windows appear where we specified in the code.

   However, when we run the same XView-written applications under the
   control of the Motif Window Manager (mwm), Mwm does not "listen" to
   the XView applications' placement requests.

   My question is, whose fault is this and when will it be fixed either
   by Sun or by the OSF?  (yeah right, like that's not too much to ask)

Silly me, the quick answer is to put the following line in your Mwm
resources file (the one in /usr/lib/X11/app-defaults/Mwm or your
personal version in $HOME):

Mwm*clientAutoPlace:		False

Meanwhile, I've gotten some good help from kind readers.  On the XView
side, I've been told to read page 70 of the XView Programming Manual
and use the "frame_set_rect()" function to position a window.  I've
used this and it works; however, there has been no apparent difference
in behavior between this method and the method we've been using,
namely that of setting XV_X and XV_Y.  Still, since frame_set_rect()
is there, we'll use it since it seems to me like a cleaner way of
doing things.

From the OSF side it was suggested that I look at where application
sets window manager hints, prompting me to try the xprop program to
look at the XView applications' window manager properties.  This
helped some, but xprop gave me some strange values.  For example, I
wrote a small GUIDE-generated XView program with just one base frame
of size 400x150.  I used frame_set_rect() to position the frame at
(600,600).  The frame was correctly positioned there, but when I
trained xprop on it, xprop gave me these results:

WM_NORMAL_HINTS(WM_SIZE_HINTS):
                program specified location: -142835620, 0
                program specified size: 55064 by -134219868

Maybe I'm missing something here, but these numbers don't look right
to me.

The numbers reported by xprop were always "strange" like this for
XView applications.  If somebody could suggest an explanation for
this, I'd love to hear it.

Thanks to all who responded.

	George

-- 
______________________________________________________________________________
George D. Drapeau			Internet: drapeau@jessica.stanford.edu
Academic Information Resources
Stanford University