Mercurial > hg > xemacs-beta
changeset 1559:9bf5135fc04f
[xemacs-hg @ 2003-07-04 07:16:25 by michaels]
2003-07-02 Mike Sperber <mike@xemacs.org>
* toolbar.c (update_frame_toolbars_geometry): Update the frame
size when correct information to compute it is actually available.
Moreover, do it right via the frame method if it's available.
author | michaels |
---|---|
date | Fri, 04 Jul 2003 07:16:26 +0000 |
parents | 2a1866f3e7c0 |
children | c69c3868eeeb |
files | src/ChangeLog src/toolbar.c |
diffstat | 2 files changed, 21 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Thu Jul 03 21:52:21 2003 +0000 +++ b/src/ChangeLog Fri Jul 04 07:16:26 2003 +0000 @@ -1,3 +1,9 @@ +2003-07-02 Mike Sperber <mike@xemacs.org> + + * toolbar.c (update_frame_toolbars_geometry): Update the frame + size when correct information to compute it is actually available. + Moreover, do it right via the frame method if it's available. + 2003-06-30 Ilya N. Golubev <gin@mo.msk.ru> * faces.c (complex_vars_of_faces): Fix missing commas in `fonts'
--- a/src/toolbar.c Thu Jul 03 21:52:21 2003 +0000 +++ b/src/toolbar.c Fri Jul 04 07:16:26 2003 +0000 @@ -750,7 +750,7 @@ || f->frame_changed || f->clear)) { - int pos; + int pos, frame_size_changed = 0; /* We're not officially "in redisplay", so we still have a chance to re-layout toolbars and windows. This is done here, @@ -763,14 +763,7 @@ for (pos = 0; pos < 4; pos++) if (FRAME_REAL_TOOLBAR_SIZE (f, pos) != FRAME_CURRENT_TOOLBAR_SIZE (f, pos)) - { - int width, height; - pixel_to_char_size (f, FRAME_PIXWIDTH (f), FRAME_PIXHEIGHT (f), - &width, &height); - change_frame_size (f, height, width, 0); - MARK_FRAME_LAYOUT_CHANGED (f); - break; - } + frame_size_changed = 1; for (pos = 0; pos < 4; pos++) { f->current_toolbar_size[pos] = FRAME_REAL_TOOLBAR_SIZE (f, pos); @@ -781,11 +774,24 @@ FRAME_LAST_NONMINIBUF_WINDOW instead of FRAME_SELECTED_WINDOW throughout the toolbar code. */ compute_frame_toolbars_data (f); + + if (frame_size_changed) + { + int width, height; + pixel_to_char_size (f, FRAME_PIXWIDTH (f), FRAME_PIXHEIGHT (f), + &width, &height); + if (!HAS_FRAMEMETH_P (f, set_frame_size)) + change_frame_size (f, height, width, 0); + else + FRAMEMETH (f, set_frame_size, (f, width, height)); + MARK_FRAME_LAYOUT_CHANGED (f); + } /* Clear the previous toolbar locations. If we do it later (after redisplay) we end up clearing what we have just displayed. */ MAYBE_DEVMETH (d, clear_frame_toolbars, (f)); + } }