+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.
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. */
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