From 8c38c2b77a5f0b256948bda0d3f9b6272483a42d Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Sat, 3 Jan 2015 17:40:40 +0100 Subject: [PATCH] Two fixes for setting up sizes of a new frame (Bug#19428). * frame.c (x_set_frame_parameters): Call Fset_frame_size only if f->can_x_set_window_size is true. * xterm.c (x_set_window_size_1): Call change_frame_size with text sizes instead of pixel sizes (Bug#19428). --- src/ChangeLog | 7 +++++++ src/frame.c | 2 +- src/xterm.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d204ccf822d..6d25fc21f3b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2015-01-03 Martin Rudalics + + * frame.c (x_set_frame_parameters): Call Fset_frame_size only if + f->can_x_set_window_size is true. + * xterm.c (x_set_window_size_1): Call change_frame_size with + text sizes instead of pixel sizes (Bug#19428). + 2015-01-01 Eli Zaretskii * xdisp.c (pos_visible_p): Fix up the X coordinate for diff --git a/src/frame.c b/src/frame.c index 13b05c6b0fd..bdc914f75c5 100644 --- a/src/frame.c +++ b/src/frame.c @@ -3219,7 +3219,7 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist) if ((width_change && width != FRAME_TEXT_WIDTH (f)) || (height_change && height != FRAME_TEXT_HEIGHT (f)) - || f->new_height || f->new_width) + || f->can_x_set_window_size && (f->new_height || f->new_width)) { /* If necessary provide default values for HEIGHT and WIDTH. Do that here since otherwise a size change implied by an diff --git a/src/xterm.c b/src/xterm.c index 0a60bd14fdf..cf4aab0eb2d 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -9542,7 +9542,7 @@ x_set_window_size_1 (struct frame *f, bool change_gravity, x_wait_for_event (f, ConfigureNotify); else { - change_frame_size (f, pixelwidth, pixelheight, false, true, false, true); + change_frame_size (f, width, height, false, true, false, true); x_sync (f); } } -- 2.39.2