[GRASS5] winname.h inconsistency found

Glynn Clements glynn.clements at virgin.net
Sun May 26 12:47:52 EDT 2002


Alex Shevlakov wrote:

> I've been long time wondering why tcltkgrass stopped closing monitors and
> restoring them on reload. That's what I found out:
> 
> gui.tcl, line 1159:
> } elseif {[regexp -nocase {^ *Name:.*GRASS.*Monitor: *(.*)} $line buffer monitor]}
> 
> in proc search_xdrivers, which must return a list of opened drivers
> (as parameter to stop_monitors, for example. But: trying to parse a
> string that *must* contain the word "GRASS" we'd fail to compose this
> list, as the window title has no word 'GRASS' - only version number
> (see winname.h and Graph_Set.c in XDRIVER sources.
> 
> There are at least two ways to fix this bug, - change the parser code
> in gui.tcl (which I did to finally see my black windows hop-hop-hop),
> or add the word GRASS to window name.

I would have thought that parsing the output from "d.mon -L" would be
preferable. That should work for all drivers, not just XDRIVER.

Apart from that, the WM_CLASS property should always have "XDRIVER" as
the "name" field.

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



More information about the grass-dev mailing list