[GRASS5] Monitor Resize Problem

Bob Covill bcovill at tekmap.ns.ca
Thu Jul 19 07:56:06 EDT 2001


Glynn Clements wrote:
> 
> Bob Covill wrote:
> 
> > > > > Can you try modifying src/display/devices/XDRIVER/XDRIVER24/Client.c,
> > > > > line 22. Currently, it should read:
> > > > >
> > > > >         szhints->flags = PSize;
> > > > >
> > > > > Settings worth trying include
> 
> [snip]
> 
> > > > > and
> > > > >         szhints->flags = USPosition | USSize;
> > > >
> > > > WM_NORMAL_HINTS(WM_SIZE_HINTS):
> > > >                 user specified location: 0, 0
> > > >                 user specified size: 450 by 400
> 
> [snip]
> 
> > > > I was not able to resize the monitor after the abovce changes with the
> > > > exception of "flags = 0". In the case of "flags = 0" I was able to
> > > > resize the monitor until I drew in it. After that I was unable to resize
> > > > it.  The size seems to be getting locked somehow?? Could it be leaving a
> > > > lock (??) file somewhere?
> 
> [snip]
> 
> > Disabling set_size() seems to have worked. Below is the output from
> > xprop.
> >
> > WM_STATE(WM_STATE):
> >                 window state: Normal
> >                 icon window: 0x3404901
> > _DT_WORKSPACE_PRESENCE(_DT_WORKSPACE_PRESENCE) = 0x101
> > WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW
> > WM_CLASS(STRING) = "x0", "GRASS 5.0.0pre1"
> > WM_HINTS(WM_HINTS):
> >                 bitmap id # to use for icon: 0x6400002
> > WM_NORMAL_HINTS(WM_SIZE_HINTS):
> >                 user specified location: 10, 10
> >                 user specified size: 450 by 400
> 
> OK, so this is effectively the same WM_NORMAL_HINTS setting as above
> except that now it works.
> 
> It seems that the min/max size setting is "sticky", i.e. once the
> WM_NORMAL_HINTS property is given a min/max size, it persists even
> after after the property is changed back.
> 
> Try replacing the lines:
> 
>         szhints->flags = PSize;
>         szhints->width       = xwa.width;
>         szhints->height      = xwa.height;
>         szhints->min_width   = xwa.width;
>         szhints->min_height  = xwa.height;
>         szhints->max_width   = xwa.width;
>         szhints->max_height  = xwa.height;
> 
>         if (minmax)
>                 szhints->flags |= PMinSize | PMaxSize;
> 
> with:
> 
>         szhints->flags = PSize | PMinSize | PMaxSize;
>         szhints->width       = xwa.width;
>         szhints->height      = xwa.height;
>         if (minmax)
>         {
>                 szhints->min_width   = xwa.width;
>                 szhints->min_height  = xwa.height;
>                 szhints->max_width   = xwa.width;
>                 szhints->max_height  = xwa.height;
>         }
>         else
>         {
>                 szhints->min_width   = 0;
>                 szhints->min_height  = 0;
>                 szhints->max_width   = DisplayWidth(dpy, scrn);
>                 szhints->max_height  = DisplayHeight(dpy, scrn);
>         }
> 
> If this works, can you also check that "maximising" the window works
> correctly (i.e. it doesn't result in a window which is larger than the
> screen).
> 
> --
> Glynn Clements <glynn.clements at virgin.net>

Glynn,

The above changes seem to work fine.  Below is the HINTS output from
xprops ...

WM_NORMAL_HINTS(WM_SIZE_HINTS):
                program specified size: 450 by 400
                program specified minimum size: 0 by 0
                program specified maximum size: 1280 by 1024

Maximising the window does seem to go a little bit larger than the
screen size.

-- 
Bob Covill

Tekmap Consulting
P.O. Box 2016 Fall River, N.S.
B2T 1K6
Canada

E-Mail: bcovill at tekmap.ns.ca
Phone: 902-860-1496
Fax: 902-860-1498



More information about the grass-dev mailing list