The enclosed patch added -setgrid support. The
difference from the text widget's setgrid is that the
argument is number of pixels per-grid unit. So
"-setgrid 1" would cause the window manager to report
the window size in pixels, "-setgrid 10" would cause
the window manager to report the window size in tens of
pixels. This patch could be extended to use different
grid units in the x and y directions (which is implicit
with the character size in the text widget), but that
will be for someone else to do. Note that some window
managers (dtwm) might report the wrong window size with
a grid unit of one pixel.
This patch includes code that limits calls to
Tk_ResizeWindow to when the width or height (or grid
size) actual changes, which removes extras redraws that
used to occur when only the cursor changes.
UCSF Computer Graphics Lab
Log in to post a comment.