How do I get MWM resources values at run time

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

5 posts / 0 new
Last post
How do I get MWM resources values at run time

Hi ,

I set MWM resources like frameBorderWidth and resizeBorderWidth in the mwm resource file. I want to know what the values are in my program at run time in order to calculate window positions better.

I tryed using
XrmGetResource(db,"Mwm*frameBorderWidth",NULL,&type,&value)

but it does not return the value.

how can I get the info I need ?

thanks in advance

ICS_support

Well, strictly speaking you can`t. If mwm was invoked from another system, then you may have no idea what resources were used; the resource value you fetched may not be the one in use.

You can, of course, just set the window position and have mwm do the offset calculations.

If you really want to jigger with things yourself, compare your application`s top-level window with the parent-parent-parent that mwm places around it.

 

 

ICS_support

I should add generally, your application can find out very little about the window manager, although it can set general hints for the window manager to use. This is a Good Thing, in that applications are then written to be more general and not to depend on the particular behavior of WhizBangWM.

orank

Hi,

thank you ,
I can really get the MWM window size by asking for the top parent of my application window. it works -)

I do that by using
XQueryTree
instead of using XtParent 3 times.

once again , thank you very much

orank

Hi dbl,

for the past few weeks I have been working my way to do what I need without knowing MWM values. but I do not understand how this can be done. I will explain

I have a few windows (5 actually) in my application and I want to set them in exact positions so they will fill the entire screen. But on every platform and even on the same platform in different stations the MWM border width can vary by the value set in
MWM*frameBorderWidth 5
More critical then that is the setting
MWM*positionIsFrame True/False
If the positionIsFrame is different then all the windows come up at wrong places because the window manager calculates the position differently.

I want to create one function that gets the screen size and width (no problem there) and fits my 5 windows on the entire screen. How ever this is impossible to do if I don?t know what the Mwm is going to do with my windows.

Another question on this subject
Can I insert Mwm resources to the Motif DB using
XrmSetResource/XrmGetResource ?

I really really need help on this one.
Thanks in advance