[GRASSLIST:5488] Can't resize monitor.

It has been mentioned before, but I thought I would resurrect this issue.

Problem: Using Grass5.0, we cannot resize the Xwindow monitor created using d.mon.

Background:

  • We just upgraded to Grass5.0.x finally after many years of hanging onto Grass4.3! Grass4.3 did not have this problem, you could resize the window monitor all you wanted (just be sure to do d.erase and redraw the screen).

  • This problem occurs using CDE in Solaris8 on a Sun workstation, and using RedHat Linux 8.0 on an Intel workstation.

Questions:

  1. Any resolution for this issue? Is it a system setting or will Grass5.0 simply not allow you to resize the window?
  2. Several people have reported a “d.resize” command. I find no evidence of a d.resize…the command doesn’t exist! Any explanation for this?

Without the ability to resize the montor window, it will be very difficult to simply jump into Grass5. Screen real estate is a premium and window resizing is an important function!

md

Matt Doggett

Spatial Climate Analysis Service

Oregon State University

316 Strand Ag Hall

Corvallis, OR 97331

(541)737-9153

mdoggett@coas.oregonstate.edu

Matt Doggett wrote:

It has been mentioned before, but I thought I would resurrect this
issue.

Problem: Using Grass5.0, we cannot resize the Xwindow monitor created
using d.mon.

Background:

- We just upgraded to Grass5.0.x finally after many years of hanging
onto Grass4.3! Grass4.3 did not have this problem, you could resize the
window monitor all you wanted (just be sure to do d.erase and redraw the
screen).

- This problem occurs using CDE in Solaris8 on a Sun workstation, and
using RedHat Linux 8.0 on an Intel workstation.

Questions:

1. Any resolution for this issue? Is it a system setting or will
Grass5.0 simply not allow you to resize the window?

It seems to be a bug in certain window managers; dtwm and BlackBox
have both been reported as having problems, fvwm and twm both work.

XDRIVER itself adds geometry constraints when a client connects, and
removes them when the client finishes. This was added to prevent users
from resizing the monitor in the middle of an interactive program
(e.g. v.digit, d.what.*), as the programs can't handle this.

The problem is that certain window managers honour the geometry
constraints even after they have been removed. You can confirm this
using the "xprop" utility.

2. Several people have reported a "d.resize" command. I find no
evidence of a d.resize.the command doesn't exist! Any explanation for
this?

It's present in 5.0.0 and 5.0.1 (in $GISBASE/scripts).

Without the ability to resize the montor window, it will be very
difficult to simply jump into Grass5. Screen real estate is a premium
and window resizing is an important function!

The initial size of a monitor is determined by the GRASS_WIDTH and
GRASS_HEIGHT environment variables, e.g.

  GRASS_WIDTH=512
  export GRASS_WIDTH
  GRASS_HEIGHT=384
  export GRASS_HEIGHT

Also, if you start the monitor without selecting it:

  d.mon -s start=x0

you should be able to resize it. You then need to select it with:

  d.mon select=x0

However, after this, the problematic WMs won't let you resize it.

--
Glynn Clements <glynn.clements@virgin.net>

-----Original Message-----
From: owner-GRASSLIST@baylor.edu [mailto:owner-GRASSLIST@baylor.edu]

On

Behalf Of Glynn Clements
Sent: Thursday, February 06, 2003 5:23 PM
To: mdoggett@coas.oregonstate.edu
Cc: GRASSLIST@baylor.edu
Subject: [GRASSLIST:5495] Re: Can't resize monitor.

It seems to be a bug in certain window managers; dtwm and BlackBox
have both been reported as having problems, fvwm and twm both work.

How could it be a bug in the window manager? I could resize monitors
just fine in 4.3 but not in 5.0. GRASS changed...my wm did not.

XDRIVER itself adds geometry constraints when a client connects, and
removes them when the client finishes. This was added to prevent users
from resizing the monitor in the middle of an interactive program
(e.g. v.digit, d.what.*), as the programs can't handle this.

So are you telling me that Grass5.0 is programmed to lock the monitor
window so that a user cannot resize it once it is open and selected? If
so, this is a fundamentally different way of handling monitor windows
than Grass4.3.

The problem is that certain window managers honour the geometry
constraints even after they have been removed. You can confirm this
using the "xprop" utility.

I've used the xprop utility and get the following results. The main
thing is that Grass5.0 is calling the XDRIVER and specifying tighter
constraints for the monitor (e.g. not specifying max/min sizes). If
this is normal, fine, then I can deal with it. The main thing is that
I'm just used to the Grass4.3 functionality which lets you resize your
monitor window while it's open and selected. If Grass5.0 is programmed
not to let the user do it, then so be it.

GRASS4.3 (notice that it specifies a min and max size...allowing
resizable monitors):

WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified location: 10, 10
                user specified size: 450 by 400
                program specified minimum size: 0 by 0
                program specified maximum size: 1260 by 994

GRASS5.0 (notice the fixed size. The WM is doing exactly what GRASS5.0
is telling it to do?):

WM_NORMAL_HINTS(WM_SIZE_HINTS):
                program specified size: 640 by 480

Also, if you start the monitor without selecting it:

  d.mon -s start=x0

you should be able to resize it. You then need to select it with:

  d.mon select=x0

Thanks for the tip, deselecting the monitor will allow me to resize it.

-MD

PS. Is there a document anywhere that describes the major
changes/differences between Grass4.3 and Grass5.0?

Matt Doggett wrote:

> It seems to be a bug in certain window managers; dtwm and BlackBox
> have both been reported as having problems, fvwm and twm both work.

How could it be a bug in the window manager? I could resize monitors
just fine in 4.3 but not in 5.0. GRASS changed...my wm did not.

4.3 doesn't include the code which triggers the bug, 5.0 does.

If there's a bug in any functionality which is part of the system
(rather than in an application), only programs which actually use that
functionality will have problems. That doesn't mean that the bug is in
those programs.

> XDRIVER itself adds geometry constraints when a client connects, and
> removes them when the client finishes. This was added to prevent users
> from resizing the monitor in the middle of an interactive program
> (e.g. v.digit, d.what.*), as the programs can't handle this.

So are you telling me that Grass5.0 is programmed to lock the monitor
window so that a user cannot resize it once it is open and selected? If
so, this is a fundamentally different way of handling monitor windows
than Grass4.3.

No. GRASS 5.0 inhibits resizing while a program is running. Resizing
should be allowed once the client terminates; however, certain WMs
fail to notice when the restriction is removed.

> The problem is that certain window managers honour the geometry
> constraints even after they have been removed. You can confirm this
> using the "xprop" utility.

I've used the xprop utility and get the following results. The main
thing is that Grass5.0 is calling the XDRIVER and specifying tighter
constraints for the monitor (e.g. not specifying max/min sizes).

Not specifying a min/max size means that there are no constraints upon
resizing. E.g. xlogo doesn't specify a min/max size, and can be
resized arbitrarily. xterm specifies a minimum but no maximum, and so
can be resized to any size above the minimum. Many programs don't
specify a min/max size.

If
this is normal, fine, then I can deal with it. The main thing is that
I'm just used to the Grass4.3 functionality which lets you resize your
monitor window while it's open and selected. If Grass5.0 is programmed
not to let the user do it, then so be it.

See above.

GRASS4.3 (notice that it specifies a min and max size...allowing
resizable monitors):

No. If there are no min/max size, you can (notwithstanding WM bugs)
resize the window arbitrarily.

To inhibit resizing, XDRIVER sets both the min/max sizes to the
current window size. Use xprop while a client (e.g. d.what.rast) is
connected to see this in action:

WM_NORMAL_HINTS(WM_SIZE_HINTS):
                program specified size: 640 by 480
                program specified minimum size: 640 by 480
                program specified maximum size: 640 by 480

WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified location: 10, 10
                user specified size: 450 by 400
                program specified minimum size: 0 by 0
                program specified maximum size: 1260 by 994

Note that the 1260x994 is fiction. XDRIVER is simply guessing what the
min/max size ought to be, based upon the screen size. The "correct"
solution is not to specify any limits.

GRASS5.0 (notice the fixed size. The WM is doing exactly what GRASS5.0
is telling it to do?):

The problem was that you could resize the window while a client was
running. This confused people, as the client won't acknowledge the
change; it reads the size at startup and assumes that it remains
constant.

So, it was requested to prevent resizing while a client was running.

WM_NORMAL_HINTS(WM_SIZE_HINTS):
                program specified size: 640 by 480

> Also, if you start the monitor without selecting it:
>
> d.mon -s start=x0
>
> you should be able to resize it.

Note: if you use xprop at this point, you will get the "typical"
setting for WM_NORMAL_HINTS. Yet, at this point, you *can* resize it.

So, the problem is that, once a min/max size has been set, certain WMs
remember the min/max size; you can change the limits, but any attempt
to remove them is ignored.

--
Glynn Clements <glynn.clements@virgin.net>