GNU bug report logs - #30699
26.0.91; buffer contents flicker on macOS frames when frames are resized

Previous Next

Package: emacs;

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

Date: Sun, 4 Mar 2018 17:39:01 UTC

Severity: normal

Tags: fixed

Found in version 26.0.91

Fixed in version 27.1

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

Bug is archived. No further changes may be made.

Full log


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

From: Alan Third <alan <at> idiocy.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 30699 <at> debbugs.gnu.org, aaronjensen <at> gmail.com
Subject: Re: bug#30699: 26.0.91; buffer contents flicker on macOS frames when
 frames are resized
Date: Wed, 7 Mar 2018 20:26:03 +0000
On Wed, Mar 07, 2018 at 07:26:01PM +0200, Eli Zaretskii wrote:
> > I’ve tried adding calls to NSDisableScreenUpdates and
> > NSEnableScreenUpdates in redisplay_internal, just to see if it works,
> > but I couldn’t get it to work at all: I always saw the blanked frame.
> > Either these functions don’t work as advertised or there’s something
> > else going on. It’s quite probable I’ve misunderstood
> > redisplay_internal.
> 
> If you tell me where did you try to add these calls and perhaps also
> what was your mental model of what redisplay_internal does when you
> did that, I might be able to help you add this in the right places
> (assuming the idea is workable, and I trust your expertise on that).

updateFrameSize in nsterm.m calls SET_FRAME_GARBAGED, which appears to
just flag the frame for clearing.

My assumption was that redisplay first checks if the frame is garbaged
and if so clears it, then redraws the contents of the frame.

I put the calls to NS(En|Dis)ableScreenUpdates at the start and end of
redisplay_internal:

modified   src/xdisp.c
@@ -13868,7 +13868,7 @@ redisplay_internal (void)
   redisplaying_p = true;
   block_buffer_flips ();
   specbind (Qinhibit_free_realized_faces, Qnil);
-
+  ns_disable_screen_updates ();
   /* Record this function, so it appears on the profiler's backtraces.  */
   record_in_backtrace (Qredisplay_internal_xC_functionx, 0, 0);
 
@@ -14602,7 +14602,7 @@ redisplay_internal (void)
 #endif
   if (interrupt_input && interrupts_deferred)
     request_sigio ();
-
+  ns_enable_screen_updates ();
   unbind_to (count, Qnil);
   RESUME_POLLING;
 }

I realise this isn’t robust, but I was just testing it out.

I imagine my failure here is that ns_clear_frame isn’t called from
redisplay at all, but somewhere else.
-- 
Alan Third




This bug report was last modified 7 years and 113 days ago.

Previous Next


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