From e81bf671f31663359e2572e8c183f3a4d7e5f708 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Thu, 4 Oct 2018 22:47:23 +0100 Subject: [PATCH] Fix occasional redraw error (bug#32932) * src/nsterm.m (ns_clip_to_rect, ns_reset_clipping): Always pop the graphics state. --- src/nsterm.m | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index d92d6c3244..72ad57c64d 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -277,7 +277,6 @@ - (NSColor *)colorUsingDefaultColorSpace /* display update */ static int ns_window_num = 0; -static BOOL gsaved = NO; static BOOL ns_fake_keydown = NO; #ifdef NS_IMPL_COCOA static BOOL ns_menu_bar_is_hidden = NO; @@ -1180,7 +1179,6 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen) NSRectClipList (r, 2); else NSRectClip (*r); - gsaved = YES; return YES; } @@ -1204,11 +1202,7 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen) { NSTRACE_WHEN (NSTRACE_GROUP_FOCUS, "ns_reset_clipping"); - if (gsaved) - { - [[NSGraphicsContext currentContext] restoreGraphicsState]; - gsaved = NO; - } + [[NSGraphicsContext currentContext] restoreGraphicsState]; } -- 2.18.0