GNU bug report logs - #32932
27.0.50; render bugs on macOS Mojave

Previous Next

Package: emacs;

Reported by: Aaron Jensen <aaronjensen <at> gmail.com>

Date: Thu, 4 Oct 2018 13:07:02 UTC

Severity: minor

Tags: fixed

Merged with 31904, 33891, 34127, 34710, 36302

Found in versions 26.1.90, 26.1.91, 26.2.90, 27.0.50

Fixed in version 28.1

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

Full log


Message #179 received at 32932 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: boris <at> d12frosted.io, 32932 <at> debbugs.gnu.org, aaronjensen <at> gmail.com
Subject: Re: bug#32932: 27.0.50; render bugs on macOS Mojave
Date: Sun, 4 Nov 2018 20:11:48 +0000
On Sun, Nov 04, 2018 at 01:24:04PM +0000, Alan Third wrote:
> 
> I think what’s probably happening is that when the image begins to
> load the emacs window containing the dired buffer is marked as
> garbaged as it’s going to be replaced by the buffer containing the
> image, however because there’s a reasonably long gap between the user
> requesting the opening of the image, and the image actually loading
> redisplay and expose_frame have time to run.
> 
> Because the window is marked as garbaged expose_window doesn’t do
> anything.

After thinking about this for a while I realised that what we probably
need to do is just make sure the frame is updated before redisplay
starts changing it.

This seems to work here:

modified   src/nsterm.m
@@ -1061,6 +1061,17 @@ 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

-- 
Alan Third




This bug report was last modified 5 years and 93 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.