Mercurial > hg > xemacs-beta
diff src/frame.c @ 5078:a04cf0fea770
fix for clipped minibuffer window
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-02-25 Ben Wing <ben@xemacs.org>
* frame-impl.h:
Create some new macros for more clearly getting the size/edges
of various rectangles surrounding the paned area.
* frame.c (change_frame_size_1):
Use the new macros. Clean up change_frame_size_1 and make sure
the internal border width gets taken into account -- that was what
was causing the clipped bottom and right.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Thu, 25 Feb 2010 06:11:07 -0600 |
parents | 92dc90c0bb40 |
children | 0ca81354c4c7 |
line wrap: on
line diff
--- a/src/frame.c Thu Feb 25 04:45:13 2010 -0600 +++ b/src/frame.c Thu Feb 25 06:11:07 2010 -0600 @@ -3595,22 +3595,13 @@ /* We need to remove the boundaries of the paned area (see top of file) from the total-area pixel size, which is what we have now. - - #### We should also be subtracting the internal borders. */ + */ new_pixheight -= - (FRAME_REAL_TOP_TOOLBAR_BOUNDS (f) - + FRAME_REAL_BOTTOM_TOOLBAR_BOUNDS (f) - + FRAME_TOP_GUTTER_BOUNDS (f) - + FRAME_BOTTOM_GUTTER_BOUNDS (f)); - + (FRAME_NONPANED_SIZE (f, TOP_EDGE) + FRAME_NONPANED_SIZE (f, BOTTOM_EDGE)); new_pixwidth -= - (FRAME_REAL_LEFT_TOOLBAR_BOUNDS (f) - + FRAME_REAL_RIGHT_TOOLBAR_BOUNDS (f) - + FRAME_LEFT_GUTTER_BOUNDS (f) - + FRAME_RIGHT_GUTTER_BOUNDS (f)); - - XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_top - = FRAME_TOP_BORDER_END (f) + FRAME_TOP_GUTTER_BOUNDS (f); + (FRAME_NONPANED_SIZE (f, LEFT_EDGE) + FRAME_NONPANED_SIZE (f, RIGHT_EDGE)); + + XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_top = FRAME_PANED_TOP_EDGE (f); if (FRAME_HAS_MINIBUF_P (f) && ! FRAME_MINIBUF_ONLY_P (f)) @@ -3636,8 +3627,7 @@ new_pixheight - minibuf_height, 0); XWINDOW (FRAME_MINIBUF_WINDOW (f))->pixel_top = - FRAME_TOP_BORDER_END (f) + - FRAME_TOP_GUTTER_BOUNDS (f) + + FRAME_PANED_TOP_EDGE (f) + FRAME_BOTTOM_GUTTER_BOUNDS (f) + new_pixheight - minibuf_height; @@ -3651,14 +3641,13 @@ if (FRAME_TTY_P (f)) f->pixheight = newheight; - XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_left = - FRAME_LEFT_BORDER_END (f) + FRAME_LEFT_GUTTER_BOUNDS (f); + XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_left = FRAME_PANED_LEFT_EDGE (f); set_window_pixwidth (FRAME_ROOT_WINDOW (f), new_pixwidth, 0); if (FRAME_HAS_MINIBUF_P (f)) { XWINDOW (FRAME_MINIBUF_WINDOW (f))->pixel_left = - FRAME_LEFT_BORDER_END (f) + FRAME_LEFT_GUTTER_BOUNDS (f); + FRAME_PANED_LEFT_EDGE (f); set_window_pixwidth (FRAME_MINIBUF_WINDOW (f), new_pixwidth, 0); } @@ -3666,10 +3655,10 @@ if (FRAME_TTY_P (f)) f->pixwidth = newwidth; - /* #### On MS Windows, this references FRAME_PIXWIDTH() and FRAME_PIXHEIGHT(). - I'm not sure we can count on those values being set. Instead we should - use the total pixel size we got near the top by calling - frame_conversion_internal(). We should inline the logic in + /* #### On MS Windows, this references FRAME_PIXWIDTH() and + FRAME_PIXHEIGHT(). I'm not sure we can count on those values being + set. Instead we should use the total pixel size we got near the top + by calling frame_conversion_internal(). We should inline the logic in get_frame_char_size() here and change that function so it just looks at FRAME_CHARWIDTH() and FRAME_CHARHEIGHT(). */ get_frame_char_size (f, &FRAME_CHARWIDTH (f), &FRAME_CHARHEIGHT (f));