aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Rudalics2014-01-25 15:39:49 +0100
committerMartin Rudalics2014-01-25 15:39:49 +0100
commit45ccd909415552157b546e917b425101c7c0b063 (patch)
treeaae1be4896074490fca746beef2d3c42c78b402a /src
parent83682f3e4d196c68ed1d053f9eeab767d61b6d4f (diff)
downloademacs-45ccd909415552157b546e917b425101c7c0b063.tar.gz
emacs-45ccd909415552157b546e917b425101c7c0b063.zip
Fix handling of face attributes in Fx_create_frame (Bug#16529).
* w32fns.c (Fx_create_frame): Don't inhibit running Lisp code too early. Again run change_frame_size before assigning menu- and tool-bar-lines.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/w32fns.c51
2 files changed, 41 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4f4f14e6020..7ed097976a1 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12014-01-25 Martin Rudalics <rudalics@gmx.at>
2
3 Fix handling of face attributes in Fx_create_frame (Bug#16529).
4 * w32fns.c (Fx_create_frame): Don't inhibit running Lisp code
5 too early. Again run change_frame_size before assigning menu-
6 and tool-bar-lines.
7
12014-01-25 Fabrice Popineau <fabrice.popineau@gmail.com> 82014-01-25 Fabrice Popineau <fabrice.popineau@gmail.com>
2 9
3 * w32term.c (w32_read_socket): When the WM_DISPLAYCHANGE message 10 * w32term.c (w32_read_socket): When the WM_DISPLAYCHANGE message
diff --git a/src/w32fns.c b/src/w32fns.c
index 0d965647599..8d64af5b93d 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -4418,12 +4418,6 @@ This function is an internal primitive--use `make-frame' instead. */)
4418 /* With FRAME_DISPLAY_INFO set up, this unwind-protect is safe. */ 4418 /* With FRAME_DISPLAY_INFO set up, this unwind-protect is safe. */
4419 record_unwind_protect (do_unwind_create_frame, frame); 4419 record_unwind_protect (do_unwind_create_frame, frame);
4420 4420
4421 /* Avoid calling window-configuration-change-hook; otherwise we could
4422 get into all kinds of nasty things like an infloop in next_frame or
4423 violating a (height >= 0) assertion in window_box_height. */
4424 record_unwind_protect (unwind_create_frame_1, inhibit_lisp_code);
4425 inhibit_lisp_code = Qt;
4426
4427#ifdef GLYPH_DEBUG 4421#ifdef GLYPH_DEBUG
4428 image_cache_refcount = 4422 image_cache_refcount =
4429 FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0; 4423 FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
@@ -4518,17 +4512,40 @@ This function is an internal primitive--use `make-frame' instead. */)
4518 happen. */ 4512 happen. */
4519 init_frame_faces (f); 4513 init_frame_faces (f);
4520 4514
4521 /* The X resources controlling the menu-bar and tool-bar are 4515 /* Avoid calling window-configuration-change-hook; otherwise we
4522 processed specially at startup, and reflected in the mode 4516 could get an infloop in next_frame since the frame is not yet in
4523 variables; ignore them here. */ 4517 Vframe_list. */
4524 x_default_parameter (f, parameters, Qmenu_bar_lines, 4518 {
4525 NILP (Vmenu_bar_mode) 4519 ptrdiff_t count2 = SPECPDL_INDEX ();
4526 ? make_number (0) : make_number (1), 4520
4527 NULL, NULL, RES_TYPE_NUMBER); 4521 record_unwind_protect (unwind_create_frame_1, inhibit_lisp_code);
4528 x_default_parameter (f, parameters, Qtool_bar_lines, 4522 inhibit_lisp_code = Qt;
4529 NILP (Vtool_bar_mode) 4523
4530 ? make_number (0) : make_number (1), 4524 /* PXW: This is a duplicate from below. We have to do it here since
4531 NULL, NULL, RES_TYPE_NUMBER); 4525 otherwise x_set_tool_bar_lines will work with the character sizes
4526 installed by init_frame_faces while the frame's pixel size is still
4527 calculated from a character size of 1 and we subsequently hit the
4528 eassert (height >= 0) assertion in window_box_height. The
4529 non-pixelwise code apparently worked around this because it had one
4530 frame line vs one toolbar line which left us with a zero root
4531 window height which was obviously wrong as well ... */
4532 change_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
4533 FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 1, 0, 0, 1);
4534
4535 /* The X resources controlling the menu-bar and tool-bar are
4536 processed specially at startup, and reflected in the mode
4537 variables; ignore them here. */
4538 x_default_parameter (f, parameters, Qmenu_bar_lines,
4539 NILP (Vmenu_bar_mode)
4540 ? make_number (0) : make_number (1),
4541 NULL, NULL, RES_TYPE_NUMBER);
4542 x_default_parameter (f, parameters, Qtool_bar_lines,
4543 NILP (Vtool_bar_mode)
4544 ? make_number (0) : make_number (1),
4545 NULL, NULL, RES_TYPE_NUMBER);
4546
4547 unbind_to (count2, Qnil);
4548 }
4532 4549
4533 x_default_parameter (f, parameters, Qbuffer_predicate, Qnil, 4550 x_default_parameter (f, parameters, Qbuffer_predicate, Qnil,
4534 "bufferPredicate", "BufferPredicate", RES_TYPE_SYMBOL); 4551 "bufferPredicate", "BufferPredicate", RES_TYPE_SYMBOL);