Mercurial > hg > xemacs-beta
comparison src/redisplay-output.c @ 5045:c3cc3fa503a2
more frame-sizing cleanups
-------------------- ChangeLog entries follow: --------------------
man/ChangeLog addition:
2010-02-16 Ben Wing <ben@xemacs.org>
* internals/internals.texi (Top):
* internals/internals.texi (Modules for the Basic Displayable Lisp Objects):
* internals/internals.texi (Creating a Window-System Type):
* internals/internals.texi (Window and Frame Geometry):
* internals/internals.texi (Intro to Window and Frame Geometry):
* internals/internals.texi (The Frame):
* internals/internals.texi (The Non-Client Area):
* internals/internals.texi (The Client Area):
* internals/internals.texi (The Paned Area):
* internals/internals.texi (Text Areas):
* internals/internals.texi (The Displayable Area):
* internals/internals.texi (Which Functions Use Which?):
* internals/internals.texi (The Redisplay Mechanism):
Integrate the long comment in frame.c into the internals manual.
src/ChangeLog addition:
2010-02-16 Ben Wing <ben@xemacs.org>
* frame-impl.h:
* frame-impl.h (FRAME_INTERNAL_BORDER_WIDTH):
* frame-impl.h (FRAME_REAL_TOOLBAR_BOUNDS):
* frame-impl.h (FRAME_REAL_TOP_TOOLBAR_BOUNDS):
* frame-impl.h (FRAME_BOTTOM_BORDER_START):
* frame-impl.h (FRAME_LEFT_BORDER_START):
* frame-impl.h (FRAME_RIGHT_BORDER_START):
* frame.c (frame_conversion_internal_1):
* frame.c (change_frame_size_1):
* redisplay-output.c (clear_left_border):
* redisplay-output.c (clear_right_border):
* redisplay-output.c (redisplay_clear_top_of_window):
* redisplay-output.c (redisplay_clear_to_window_end):
* redisplay-output.c (redisplay_clear_bottom_of_window):
Rename FRAME_BORDER_* to FRAME_INTERNAL_BORDER_*. Add
general FRAME_INTERNAL_BORDER_SIZE(). Add FRAME_REAL_TOOLBAR_BOUNDS()
to encompass the entire size of the toolbar including its border.
Add specific top/left/bottom/right versions of this macro.
Rewrite FRAME_*_BORDER_START and FRAME_*_BORDER_END to take into use
FRAME_REAL_*_TOOLBAR_BOUNDS(). Add some comments about existing
problems in frame sizing and how they might be fixed. Simplify
change_frame_size_1() using the macros just created.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Tue, 16 Feb 2010 01:21:32 -0600 |
parents | 0d4c9d0f6a8d |
children | 07dcc7000bbf |
comparison
equal
deleted
inserted
replaced
5044:e84a30b0e4a2 | 5045:c3cc3fa503a2 |
---|---|
636 struct frame *f = XFRAME (w->frame); | 636 struct frame *f = XFRAME (w->frame); |
637 Lisp_Object window = wrap_window (w); | 637 Lisp_Object window = wrap_window (w); |
638 | 638 |
639 redisplay_clear_region (window, DEFAULT_INDEX, | 639 redisplay_clear_region (window, DEFAULT_INDEX, |
640 FRAME_LEFT_BORDER_START (f), y, | 640 FRAME_LEFT_BORDER_START (f), y, |
641 FRAME_BORDER_WIDTH (f), height); | 641 FRAME_INTERNAL_BORDER_WIDTH (f), height); |
642 } | 642 } |
643 | 643 |
644 /***************************************************************************** | 644 /***************************************************************************** |
645 clear_right_border | 645 clear_right_border |
646 | 646 |
652 struct frame *f = XFRAME (w->frame); | 652 struct frame *f = XFRAME (w->frame); |
653 Lisp_Object window = wrap_window (w); | 653 Lisp_Object window = wrap_window (w); |
654 | 654 |
655 redisplay_clear_region (window, DEFAULT_INDEX, | 655 redisplay_clear_region (window, DEFAULT_INDEX, |
656 FRAME_RIGHT_BORDER_START (f), | 656 FRAME_RIGHT_BORDER_START (f), |
657 y, FRAME_BORDER_WIDTH (f), height); | 657 y, FRAME_INTERNAL_BORDER_WIDTH (f), height); |
658 } | 658 } |
659 | 659 |
660 /***************************************************************************** | 660 /***************************************************************************** |
661 output_display_line | 661 output_display_line |
662 | 662 |
2100 x = w->pixel_left; | 2100 x = w->pixel_left; |
2101 width = w->pixel_width; | 2101 width = w->pixel_width; |
2102 | 2102 |
2103 if (window_is_leftmost (w)) | 2103 if (window_is_leftmost (w)) |
2104 { | 2104 { |
2105 x -= FRAME_BORDER_WIDTH (f); | 2105 x -= FRAME_INTERNAL_BORDER_WIDTH (f); |
2106 width += FRAME_BORDER_WIDTH (f); | 2106 width += FRAME_INTERNAL_BORDER_WIDTH (f); |
2107 } | 2107 } |
2108 if (window_is_rightmost (w)) | 2108 if (window_is_rightmost (w)) |
2109 width += FRAME_BORDER_WIDTH (f); | 2109 width += FRAME_INTERNAL_BORDER_WIDTH (f); |
2110 | 2110 |
2111 y = FRAME_TOP_BORDER_START (f) - 1; | 2111 y = FRAME_TOP_BORDER_START (f) - 1; |
2112 height = FRAME_BORDER_HEIGHT (f) + 1; | 2112 height = FRAME_INTERNAL_BORDER_HEIGHT (f) + 1; |
2113 | 2113 |
2114 redisplay_clear_region (window, DEFAULT_INDEX, x, y, width, height); | 2114 redisplay_clear_region (window, DEFAULT_INDEX, x, y, width, height); |
2115 } | 2115 } |
2116 } | 2116 } |
2117 | 2117 |
2143 bounds = calculate_display_line_boundaries (w, bflag); | 2143 bounds = calculate_display_line_boundaries (w, bflag); |
2144 window = wrap_window (w); | 2144 window = wrap_window (w); |
2145 | 2145 |
2146 if (window_is_leftmost (w)) | 2146 if (window_is_leftmost (w)) |
2147 redisplay_clear_region (window, DEFAULT_INDEX, FRAME_LEFT_BORDER_START (f), | 2147 redisplay_clear_region (window, DEFAULT_INDEX, FRAME_LEFT_BORDER_START (f), |
2148 ypos1, FRAME_BORDER_WIDTH (f), height); | 2148 ypos1, FRAME_INTERNAL_BORDER_WIDTH (f), height); |
2149 | 2149 |
2150 if (bounds.left_in - bounds.left_out > 0) | 2150 if (bounds.left_in - bounds.left_out > 0) |
2151 redisplay_clear_region (window, | 2151 redisplay_clear_region (window, |
2152 get_builtin_face_cache_index (w, Vleft_margin_face), | 2152 get_builtin_face_cache_index (w, Vleft_margin_face), |
2153 bounds.left_out, ypos1, | 2153 bounds.left_out, ypos1, |
2165 bounds.right_in, ypos1, | 2165 bounds.right_in, ypos1, |
2166 bounds.right_out - bounds.right_in, height); | 2166 bounds.right_out - bounds.right_in, height); |
2167 | 2167 |
2168 if (window_is_rightmost (w)) | 2168 if (window_is_rightmost (w)) |
2169 redisplay_clear_region (window, DEFAULT_INDEX, FRAME_RIGHT_BORDER_START (f), | 2169 redisplay_clear_region (window, DEFAULT_INDEX, FRAME_RIGHT_BORDER_START (f), |
2170 ypos1, FRAME_BORDER_WIDTH (f), height); | 2170 ypos1, FRAME_INTERNAL_BORDER_WIDTH (f), height); |
2171 } | 2171 } |
2172 } | 2172 } |
2173 } | 2173 } |
2174 | 2174 |
2175 /***************************************************************************** | 2175 /***************************************************************************** |
2215 ypos1 = WINDOW_TEXT_TOP (w); | 2215 ypos1 = WINDOW_TEXT_TOP (w); |
2216 | 2216 |
2217 /* #### See if this can be made conditional on the frame | 2217 /* #### See if this can be made conditional on the frame |
2218 changing size. */ | 2218 changing size. */ |
2219 if (MINI_WINDOW_P (w)) | 2219 if (MINI_WINDOW_P (w)) |
2220 ypos2 += FRAME_BORDER_HEIGHT (f); | 2220 ypos2 += FRAME_INTERNAL_BORDER_HEIGHT (f); |
2221 | 2221 |
2222 if (min_start >= 0 && ypos1 < min_start) | 2222 if (min_start >= 0 && ypos1 < min_start) |
2223 ypos1 = min_start; | 2223 ypos1 = min_start; |
2224 if (max_end >= 0 && ypos2 > max_end) | 2224 if (max_end >= 0 && ypos2 > max_end) |
2225 ypos2 = max_end; | 2225 ypos2 = max_end; |