[comp.windows.x] How can you determine the Motif Window Manager decoration size ?

evgabb@sdrc.UUCP (Rob Gabbard) (05/07/90)

Can you programatically determine the size of the decorations that the
Motif window manager puts around a window ?  For instance, I want to create
a window that is as wide as the screen but I want that window to be completely
on the screen when mapped with the decorations. I don't mind if the window 
manager creates a window smaller than what I requested since I can get this from
XGetGeometry (being a good X citizen).  If I use ScreenWidth() as the
width I get a window as wide as the screen PLUS the size of the resize 
decorations PLUS any matte width. Needless to say not all of this window fits
on the screen. I can position it so that just the window portion is on the 
screen with the decorations off the edges. I don't want to hard code
ScreenWidth() - (DEFAULT_RESIZE_DECOR_SIZE * 2) since the resize decoration 
size is a resource that can be customized.  The same would be true for someone 
wanting to create a window as high as the screen but it would be worse:

	ScreenHeight + Resize + Matte + TitleBar

	I've looked at the property functions in the OSF/Motif Programmer's
Guide with no success. It tells me how to limit the decorations but not how to
get their sizes.  For that matter, the user may decide not to have resize 
gadgets, title bars, etc, at all.  While I like this level of customization I 
think the ICCM needs to include a generic call applicable to all window managers
where you can hand it a top-level window of a given class and it will return the
actual screen space that window will take up, or give it a size and have it 
alter that size after adding any decorations it is going to add to acheive that 
size. The class above is necessary since you can customize the decorations
added to windows of particular class (with Mwm at least).

	This is also a problem when you have multiple top-level windows that
you need to place in relation to each other.

-- 

Rob Gabbard (uunet!sdrc!evgabb)  
Technical Development Engineer   
Structural Dynamics Research Corp