all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Doug Davis <ddavis@ddavis.io>
Cc: 42834@debbugs.gnu.org
Subject: bug#42834: 28.0.50; macOS scroll and movement latency slows when display changes
Date: Thu, 13 Aug 2020 17:00:27 +0200 (CEST)	[thread overview]
Message-ID: <20200813150024.GB26932@breton.holly.idiocy.org> (raw)
In-Reply-To: <m2pn7vilhc.fsf@ddavis.io>

On Wed, Aug 12, 2020 at 05:48:47PM -0400, Doug Davis wrote:
> > Do you see the same thing going the other way? (laptop screen -> monitor)
> 
> Ah yes, forgot to mention that- seeing it both ways.

Excellent!

> > Is your monitor a retina screen?
> 
> Yeah the MacBook is retina and the external display is 4k.

I think I know what's going on. If you don't use the exact same
settings for the drawing buffer as for the screen then some very slow
conversion processes kick in every time you flush the buffer to the
screen.

Odds are that the monitor and laptop screen have something slightly
different, probably a colorspace or something, so when switching from
one to the other the drawing buffer retains the settings for the old
screen.

Can you try the following change in nsterm.m?

@@ -8431,18 +8431,10 @@ - (void)windowDidChangeBackingProperties:(NSNotification *)notification
   if (! [self wantsUpdateLayer])
     return;
 
-  CGFloat old = [[[notification userInfo]
-                    objectForKey:@"NSBackingPropertyOldScaleFactorKey"]
-                  doubleValue];
-  CGFloat new = [[self window] backingScaleFactor];
-
-  if (old != new)
-    {
-      NSRect frame = [self frame];
-      [self createDrawingBuffer];
-      ns_clear_frame (emacsframe);
-      expose_frame (emacsframe, 0, 0, NSWidth (frame), NSHeight (frame));
-    }
+  NSRect frame = [self frame];
+  [self createDrawingBuffer];
+  ns_clear_frame (emacsframe);
+  expose_frame (emacsframe, 0, 0, NSWidth (frame), NSHeight (frame));
 }
 #endif /* NS_DRAW_TO_BUFFER */

-- 
Alan Third





  reply	other threads:[~2020-08-13 15:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-12 18:48 bug#42834: 28.0.50; macOS scroll and movement latency slows when display changes Doug Davis
2020-08-12 21:24 ` Alan Third
2020-08-12 21:48   ` Doug Davis
2020-08-13 15:00     ` Alan Third [this message]
2020-08-13 15:42       ` Doug Davis
2020-08-13 18:12         ` Alan Third

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200813150024.GB26932@breton.holly.idiocy.org \
    --to=alan@idiocy.org \
    --cc=42834@debbugs.gnu.org \
    --cc=ddavis@ddavis.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.