Andy Piper writes:
I mistakenly assumed that using the existing window gutter support
was
going to be easier than fixing frame gutters properly. Now that I've tried
to fix all the outstanding bugs, I've just ended up in a mess of twistly
little XEmacs
code paths.
This patch ditches the whole window gutter thing and calculates frame-based
gutter geometries. This magically makes everything work and is what I
should have done in the first place - except I didn't understand the XEmacs
code well enough.
Yay! I'm wondering, though, why you didn't hide the
FRAME_*_GUTTER_BOUNDS stuff inside the FRAME_*_BORDER_* macros.
For exmaple, here:
- WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f);
- WINDOW_TOP (win) = FRAME_TOP_BORDER_END (f);
+ WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f)
+ + FRAME_LEFT_GUTTER_BOUNDS (f);
+ WINDOW_TOP (win) = FRAME_TOP_BORDER_END (f)
+ + FRAME_TOP_GUTTER_BOUNDS (f);
The gutter geometry should always be part of the calculation,
just like the toolbar geometry, so I think it shouild be rolled
into the FRAME_*_BORDER_* macros. Otherwise everyone who uses
these macros must remember to add or subtract the gutter geometry.