[GRASS5] a question about grass 5 tcltk interface

Michael Barton michael.barton at asu.edu
Sun Nov 23 17:11:54 EST 2003


Glynn,

While your explanation makes sense, it doesn't seem to exactly match 
what I am seeing--at least not obviously.

1. I open grass and a bunch of windows open up--saved window geometry 
from the last time I used grass.
2. I select the option to automatically resize all the windows, and 
they shrink to the correct initial size.
3. I save configuration and quit grass (I also check the save 
configuration box in the quick dialog)
4. I reopen grass and the same windows reopen, but all have grown about 
23 pixels in the y dimension. They grow down, not up. They do not grow 
in the x dimension. This only happens for menus & dialogs, not for 
monitor windows.
5. If I continue this without doing an automatic resize, they all grow 
another 23 pixels each time I reopen grass. They at least grow to the 
edges of the screen if I let them, and perhaps can grow off the screen. 
I can send you screen shots, but don't want to send something big to 
the list.

I can's say that my Mac WM is not somehow  resizing these windows, but 
somehow  the saved geometry is augmented by about 23 pixels downwards 
in the y-dimension only and for tcltk menus and dialogs only, every 
time I quit or open (I don't know which end this happens on). This 
seems odd.


Michael


On Sunday, November 23, 2003, at 12:04 AM, Glynn Clements wrote:

>
> Michael Barton wrote:
>
>> This is probably a trivial question, but is something that can get
>> annoying. It seems that every time I open the grass tcltk interface 
>> all
>> the windows get larger vertically by some amount. If I don't do a
>>
>>> config>module windows>automatic size for all active windows
>>
>> just about every time I run grass, the tcltk module windows grow right
>> off the screen. It doesn't matter if I try to save config. In the next
>> session, they begin to grow again.
>>
>> It seems like there is some kind of window size variable that is
>> automatically incrementing in the y-dimension every time grass is
>> initialized. Am I the only person with this strange behavior? Is there
>> some way to stop the growing windows in one of the tcltk files?
>
> I don't know if you're the only person, but I can't reproduce it.
>
> However, I can see a plausible explanation. tcltkgrass records the
> geometry of each module window. When it creates the window, it uses
> the stored geometry (if present). When it receives a Configure event
> (indicating that the window has been created or resized), it updates
> the stored geometry.
>
> If the WM makes the window larger than requested, the enlarged size
> will be stored and used for the next window, which presumably will be
> enlarged even more, and so on. I'm not sure that there's any way that
> tcltkgrass can avoid this (other than by simply not attempting to
> store the geometry); if a window is enlarged, it can't tell whether
> this occurred due to user interaction or due to the WM's automatic
> behaviour.
>
> In any case, there doesn't appear to be an option to disable storing
> the geometry. To do that, you would need to remove the following code
> fragments from tcltkgrass/main/gui.tcl:
>
>     bind $path <Configure> {
>         if [regexp {^\.([^.]+)$} %W buffer array] {
>             set ${array}(window_geometry) [wm geometry %W]
>         }
>     }
>
> and/or:
>
>     bind $name <Configure> {
>         if [regexp {^\.([^.]+).print$} %W buffer array] {
>             set ${array}(result_geometry) [wm geometry %W]
>         }
>     }
>
> [Search for <Configure> in gui.tcl.]
>
> Note: window_geometry corresponds to the dialog into which the options
> are entered, while result_geometry corresponds to the text window
> which displays the results.
>
> -- 
> Glynn Clements <glynn.clements at virgin.net>
>
____________________
C. Michael Barton, Professor
Department of Anthropology
PO Box 872402
Arizona State University
Tempe, AZ  85287-2402
USA

Phone: 480-965-6262
Fax: 480-965-7671




More information about the grass-dev mailing list