[GRASS5] xwindows - how to capture window geometry for monitor
glynn.clements at virgin.net
Thu Mar 25 22:03:02 EST 2004
> > The mechanism which gui.tcl uses (xwininfo) should be avoided, as:
> > Furthermore, that particular hack should be removed from gui.tcl at
> > the earliest opportunity.
> > Currently, there doesn't appear to be any mechanism to obtain this
> > information from within a script. I'm willing to write the
> > necessary C code, but would appreciate suggestions regarding how it
> > should be implemented (e.g. whether it's a separate utility, an
> > extension to d.mon, etc).
> How about 'd.frame -D' and parse for the full_screen d_win: section?
OK; that even handles the case where an XDRIVER window is resized
Although, technically that isn't guaranteed to return the actual size
of the window, as it's reading a pad (property list) which is set by
clients rather than the actual dimensions, but the information will
probably be correct in practice.
It's certainly better than using xwininfo, which will fail completely
in some cases.
Does anyone feel like modifying tcltkgrass to use that? The use of
xwininfo is one of the primary obstacles to using the native
MacOSX/Aqua version of Tcl/Tk for tcltkgrass.
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev