>From 98c34098dca670b0613c84af347f4fa7046ae942 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sun, 4 Mar 2018 21:29:21 +0000 Subject: [PATCH] Fix flicker when resizing frame on macOS (bug#30699) * src/nsterm.m (EmacsView::updateFrameSize): Remove SET_FRAME_GARBAGED call. (EmacsView::windoWillResize): Call SET_FRAME_GARBAGED here instead. --- src/nsterm.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/nsterm.m b/src/nsterm.m index 1919c6defa..719db4d552 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -6998,7 +6998,6 @@ - (void) updateFrameSize: (BOOL) delay FRAME_PIXEL_TO_TEXT_WIDTH (emacsframe, neww), FRAME_PIXEL_TO_TEXT_HEIGHT (emacsframe, newh), 0, delay, 0, 1); - SET_FRAME_GARBAGED (emacsframe); cancel_mouse_face (emacsframe); /* The next two lines set the frame to the same size as we've @@ -7119,6 +7118,12 @@ - (NSSize)windowWillResize: (NSWindow *)sender toSize: (NSSize)frameSize } } + /* When the frame is being resized with the mouse we need to blank + it out or else we end up with old stuff being displayed. + + FIXME: This may not be the place to put this (bug#30699). */ + SET_FRAME_GARBAGED (emacsframe); + NSTRACE_RETURN_SIZE (frameSize); return frameSize; -- 2.16.1