From 18028318d8908d547d82e8e3159994c14bb47dce Mon Sep 17 00:00:00 2001 From: Anders Lindgren Date: Mon, 21 Sep 2015 09:01:18 +0200 Subject: [PATCH] Keep upper edge unchanged when changing size of NS frame (Bug#21415) * src/nsterm.m (x_set_window_size): Keep upper frame edge unchanged (Bug#21415). --- src/nsterm.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nsterm.m b/src/nsterm.m index 2806f31155d..14f2beb4489 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1333,6 +1333,7 @@ x_set_window_size (struct frame *f, int tb = FRAME_EXTERNAL_TOOL_BAR (f); int pixelwidth, pixelheight; int rows, cols; + int orig_height = wr.size.height; NSTRACE (x_set_window_size); @@ -1386,7 +1387,7 @@ x_set_window_size (struct frame *f, if (f->output_data.ns->zooming) f->output_data.ns->zooming = 0; else - wr.origin.y += FRAME_PIXEL_HEIGHT (f) - pixelheight; + wr.origin.y += orig_height - wr.size.height; [view setRows: rows andColumns: cols]; [window setFrame: wr display: YES]; -- 2.39.2