diff options
author | Martin Rudalics <rudalics@gmx.at> | 2013-12-03 08:45:54 +0100 |
---|---|---|
committer | Martin Rudalics <rudalics@gmx.at> | 2013-12-03 08:45:54 +0100 |
commit | 7303a0aefc1fbabfea1b6b7711a6da2289aecdb2 (patch) | |
tree | 3d00b2cab57dac461a9810a9a77f7bdeefd4fbf1 /src/xfns.c | |
parent | 39fa32d6359c8292dd91ce1c58da1aa3f8668bd8 (diff) |
Fix issues related to pixelwise resizing. (Bug#16013) (Bug#16033)
* window.c (Fset_window_new_pixel): Don't choke at negative
argument value (Bug#16033).
* xfns.c (Fx_create_frame): Add another call to change_frame_size
to avoid crash in window_box_height.
* gtkutil.h: Fix external declaration of xg_frame_set_char_size.
* gtkutil.c (xg_frame_set_char_size, style_changed_cb): Fix size
calculation.
* xterm.c (x_set_window_size): Fix size calculation (Bug#16013).
Diffstat (limited to 'src/xfns.c')
-rw-r--r-- | src/xfns.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/xfns.c b/src/xfns.c index 2830a79972..2222eee609 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -3069,6 +3069,20 @@ This function is an internal primitive--use `make-frame' instead. */) happen. */ init_frame_faces (f); + /* PXW: This is a duplicate from below. We have to do it here since + otherwise x_set_tool_bar_lines will work with the character sizes + installed by init_frame_faces while the frame's pixel size is still + calculated from a character size of 1 and we subsequently hit the + eassert (height >= 0) assertion in window_box_height. The + non-pixelwise code apparently worked around this because it had one + frame line vs one toolbar line which left us with a zero root + window height which was obviously wrong as well ... */ + width = FRAME_TEXT_WIDTH (f); + height = FRAME_TEXT_HEIGHT (f); + FRAME_TEXT_HEIGHT (f) = 0; + SET_FRAME_WIDTH (f, 0); + change_frame_size (f, width, height, 1, 0, 0, 1); + /* Set the menu-bar-lines and tool-bar-lines parameters. We don't look up the X resources controlling the menu-bar and tool-bar here; they are processed specially at startup, and reflected in |