From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs 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) Message-ID: <20200813150024.GB26932@breton.holly.idiocy.org> References: <20200812212407.GA42658@breton.holly.idiocy.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35114"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42834@debbugs.gnu.org To: Doug Davis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 13 17:01:21 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k6EjJ-00092F-Av for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Aug 2020 17:01:21 +0200 Original-Received: from localhost ([::1]:58452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k6EjI-0002Ef-CS for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Aug 2020 11:01:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k6Ej1-00021n-3c for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2020 11:01:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39103) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k6Ej0-0006gO-PS for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2020 11:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k6Ej0-0007bo-OE for bug-gnu-emacs@gnu.org; Thu, 13 Aug 2020 11:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Aug 2020 15:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42834 X-GNU-PR-Package: emacs Original-Received: via spool by 42834-submit@debbugs.gnu.org id=B42834.159733084129200 (code B ref 42834); Thu, 13 Aug 2020 15:01:02 +0000 Original-Received: (at 42834) by debbugs.gnu.org; 13 Aug 2020 15:00:41 +0000 Original-Received: from localhost ([127.0.0.1]:50647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6Eie-0007ap-VF for submit@debbugs.gnu.org; Thu, 13 Aug 2020 11:00:41 -0400 Original-Received: from mailout-l3b-97.contactoffice.com ([212.3.242.97]:47306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6Eia-0007aF-Tt for 42834@debbugs.gnu.org; Thu, 13 Aug 2020 11:00:37 -0400 Original-Received: from smtpauth1.co-bxl (smtpauth1.co-bxl [10.2.0.15]) by mailout-l3b-97.contactoffice.com (Postfix) with ESMTP id 8D50A1D14; Thu, 13 Aug 2020 17:00:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1597330830; s=20200222-6h9o; d=idiocy.org; i=alan@idiocy.org; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:In-Reply-To; l=1535; bh=cXOy/lUtyANklG4SZs5dnVD/En2pElyAtDNLedDY7Iw=; b=pAVER1i/96P8H4tQwN8hglr+C/m5zb/VreLH59Ln04fAZxV1s+bgXas+cMvdDUmy e4JJOFGggVNySJruWU9hf+WOFa99ykcmN6uVVF5ngwwatieCVTOobtC4pOtk7gh9nAr SZvyqJ73kCozH30/fRBFKjRsjxzXytBZPitHN9AJLa8qXecs/MgjWCJysTaTfil1IQC FVuPQdXD+92wey811FhyxBsQeNqI6Jk1TOsWrtjuloL4C1r+rFOxLtFudvyvq1wuzA3 zxoNc9Wc0Iafpp0pQWQ+cOWuSrFBoAsYlvw1wFY+tfIP2djjcj+HIUZYEjL2hTi8VEd khOhG9W8QA== Original-Received: by smtp.mailfence.com with ESMTPA ; Thu, 13 Aug 2020 17:00:26 +0200 (CEST) Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id DF05E20248161F; Thu, 13 Aug 2020 16:00:24 +0100 (BST) Mail-Followup-To: Alan Third , Doug Davis , 42834@debbugs.gnu.org Content-Disposition: inline In-Reply-To: X-ContactOffice-Account: com:241649512 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:185034 Archived-At: 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