Mercurial > emacs
changeset 105041:23b9177a1c8e
* xterm.c (x_new_font): Call change_frame_size before calling
x_set_window_size, in case frame size won't change.
* frame.c (x_set_font): Remove dead code.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Tue, 15 Sep 2009 18:49:56 +0000 |
parents | f43dfae3e132 |
children | 604cab002756 |
files | src/ChangeLog src/frame.c src/xterm.c |
diffstat | 3 files changed, 21 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Tue Sep 15 17:52:42 2009 +0000 +++ b/src/ChangeLog Tue Sep 15 18:49:56 2009 +0000 @@ -1,3 +1,10 @@ +2009-09-15 Jan Djärv <jan.h.d@swipnet.se> + + * xterm.c (x_new_font): Call change_frame_size before calling + x_set_window_size, in case frame size won't change. + + * frame.c (x_set_font): Remove dead code. + 2009-09-15 Stefan Monnier <monnier@iro.umontreal.ca> * lread.c (Fload): Also run do-after-load-evaluation while dumping.
--- a/src/frame.c Tue Sep 15 17:52:42 2009 +0000 +++ b/src/frame.c Tue Sep 15 18:49:56 2009 +0000 @@ -3407,9 +3407,6 @@ return; - lval = Fassq (Qfullscreen, f->param_alist); - if (CONSP (lval)) lval = CDR (lval); - x_new_font (f, font_object, fontset); store_frame_param (f, Qfont, arg); /* Recalculate toolbar height. */
--- a/src/xterm.c Tue Sep 15 17:52:42 2009 +0000 +++ b/src/xterm.c Tue Sep 15 18:49:56 2009 +0000 @@ -8026,7 +8026,20 @@ doing it because it's done in Fx_show_tip, and it leads to problems because the tip frame has no widget. */ if (NILP (tip_frame) || XFRAME (tip_frame) != f) - x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f)); + { + /* When the frame is maximized/fullscreen or running under for + example Xmonad, x_set_window_size will be a no-op. + In that case, the right thing to do is extend rows/cols to + the current frame size. We do that first if x_set_window_size + turns out to not be a no-op (there is no way to know). + The size will be adjusted again if the frame gets a + ConfigureNotify event as a result of x_set_window_size. */ + int rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, + FRAME_PIXEL_HEIGHT (f)); + int cols = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, FRAME_PIXEL_WIDTH (f)); + change_frame_size (f, rows, cols, 0, 1, 0); + x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f)); + } } #ifdef HAVE_X_I18N