XmPanedW horizontal / resize to screen / bug

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

Questions about motif? Contact us

4 posts / 0 new
Last post
XmPanedW horizontal / resize to screen / bug

Submitted by guybarrand on Tue, 12/11/2007 - 16:30.

Hello

I have observed something strange with the XmPanedW
when put in "horizontal" mode (then the slider is vertical).

If I resize the shell window to map the full screen by using
the button available in the decoration by the window manager,
then the left paned widget cannot be shrinked anymore.
It seems that the fact to have mapped the shell window
to full screen had put some minimum size constraint on
the left widget.
This can be checked on a simple program
with one paned window and two push buttons.

This behavior clearly depends of the X11 server
(or probably of the window manager). If displaying
on my Linux box (under gnome), things are ok. The
left paned widget can be shrinked.
But if displaying on a Max X server or on a Windows
Exceed, then the left widget cannot be shrinked anymore.

And this does not happen in a vertical XmPanedW.

Any idea of what is wrong here ? Is it a know bug / feature ?

My Motif client lib is an OpenMotif 2.2.2 running on a Mac.

Any help will be welcome.

Cheers

Thu, 12/13/2007 - 07:25#1

Thu, 12/13/2007 - 07:25#1

guybarrand

A little test program...

To help, I put below a little c standalone Motif program.
It can be reconstructed on most UNIXes with something like :
UNIX> cc -I/usr/X11R6/include test.c -L/usr/X11R6/lib -lXm -lXt -lX11
UNIX> ./a.out

When dispayed, you can see that you can move the splitter to the
left in order to reduce, as you want, the size of the left button.

But then, use the "full screen" button of the windows decoration to map
the main shell window to full screen and then attempt to move
the splitter to the left to minimize the width of the left button.
If displaying by using the Mac X (and then coworking
window manager), but also by displaying on a Windows / Exceed
you shall see that you hit a minimum width on the left button....
(It seems that the minimum is the width given to the left button
whilst the "full screen" resize happened).

On my Linux, by using GNOME I do not have the problem,
but some people complain by using some KDE.

Cheers

Guy

#include
#include
#include

#include

int main (int a_argn,char* a_args[]) {
#if XtSpecificationRelease == 4
Cardinal argn = (Cardinal)a_argn;
#else
int argn = a_argn;
#endif
XtAppContext appContext = 0;
Arg args[10];
Widget top;
Widget paned;
Widget b;

XtSetArg(args[0],XtNgeometry,XtNewString("400x400"));
XtSetArg(args[1],XtNborderWidth,0);
top = XtAppInitialize
(&appContext,"XmPanedW",NULL,(Cardinal)0,&argn,a_args,NULL,args,2);

XtSetArg(args[0],XmNorientation,XmHORIZONTAL);
paned = XmCreatePanedWindow(top,(char*)"paned",args,1);
XtManageChild (paned);

b = XmCreatePushButton(paned,(char*)"b1",NULL,0);
XtManageChild (b);

b = XmCreatePushButton(paned,(char*)"b2",NULL,0);
XtManageChild (b);

XtRealizeWidget (top);

XtAppMainLoop (appContext);

return EXIT_SUCCESS;
}

 

Mon, 01/28/2008 - 13:17#2

Mon, 01/28/2008 - 13:17#2

Yuriy Syrota

XmPanedW horizontal / resize to screen / bug

Seems, that this behavior cause by the fact that default maximal width of pane is 1000 pixels. Try to increase maximum pane size via XmNpaneMaximum constraint resource.

Mon, 02/11/2008 - 10:17#3

Mon, 02/11/2008 - 10:17#3

guybarrand

XmPanedW horizontal / resize to screen / bug

Hello

I have just seen your post and tried out to raise
the value of the XmNpaneMaximum on the
chidren widgets, and it works now on both
my Mac and on Exceed. I understand now
why I had this effect.
(But well, due to the today screen resolution,
it would be fine to pass the today default
value from 1000 to 10000 !)

Thanks a lot !