Skip to content

Instantly share code, notes, and snippets.

@aaronjensen
Created November 5, 2018 16:12
Show Gist options
  • Save aaronjensen/9416691b5ab31d3750eea06ac1b47dfb to your computer and use it in GitHub Desktop.
Save aaronjensen/9416691b5ab31d3750eea06ac1b47dfb to your computer and use it in GitHub Desktop.
From 9800764c5ea1448d1a4f1bd785e98ad94a940e12 Mon Sep 17 00:00:00 2001
From: Aaron Jensen <aaronjensen@gmail.com>
Date: Mon, 5 Nov 2018 08:09:31 -0800
Subject: [PATCH] Fix
---
src/nsterm.m | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/nsterm.m b/src/nsterm.m
index a52a2eb5c2..20f8b4467d 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1115,6 +1115,18 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
ns_update_auto_hide_menu_bar ();
+ /* Flush any existing changes to screen before redisplay gets going.
+ If we don't do this then it's possible for redisplay to mark
+ areas as garbaged so they won't be redrawn in the next drawRect
+ call.
+
+ Is this a bad thing to do since we're effectively calling
+ frame_expose from within redisplay? */
+ block_input ();
+ [FRAME_NS_VIEW (f) displayIfNeeded];
+ unblock_input ();
+
+
if ([view isFullscreen] && [view fsIsNative])
{
// Fix reappearing tool bar in fullscreen for Mac OS X 10.7
--
2.19.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment