From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#30699: 26.0.91; buffer contents flicker on macOS frames when frames are resized Date: Fri, 9 Mar 2018 23:24:15 +0000 Message-ID: <20180309232415.GB51893@breton.holly.idiocy.org> References: <83tvtus8rc.fsf@gnu.org> <20180305192331.GA26656@breton.holly.idiocy.org> <83muzms3i6.fsf@gnu.org> <20180306225502.GA30546@breton.holly.idiocy.org> <83a7vjre52.fsf@gnu.org> <20180307202603.GA31176@breton.holly.idiocy.org> <83r2ounzty.fsf@gnu.org> <20180309120952.GA45581@breton.holly.idiocy.org> <837eqlwf1i.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1520637793 7655 195.159.176.226 (9 Mar 2018 23:23:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Mar 2018 23:23:13 +0000 (UTC) User-Agent: Mutt/1.9.3 (2018-01-21) Cc: 30699@debbugs.gnu.org, aaronjensen@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 10 00:23:08 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1euRLu-0001rN-On for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Mar 2018 00:23:06 +0100 Original-Received: from localhost ([::1]:48578 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euRNx-0001Bm-JY for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Mar 2018 18:25:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euRNq-00019d-QU for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 18:25:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euRNm-0003K6-LP for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 18:25:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45051) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1euRNm-0003K0-GQ for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 18:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1euRNm-0006v9-4J for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 18:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Mar 2018 23:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30699 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30699-submit@debbugs.gnu.org id=B30699.152063786526548 (code B ref 30699); Fri, 09 Mar 2018 23:25:02 +0000 Original-Received: (at 30699) by debbugs.gnu.org; 9 Mar 2018 23:24:25 +0000 Original-Received: from localhost ([127.0.0.1]:52948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1euRNB-0006u8-F1 for submit@debbugs.gnu.org; Fri, 09 Mar 2018 18:24:25 -0500 Original-Received: from mail-wm0-f49.google.com ([74.125.82.49]:54261) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1euRN9-0006tt-OY for 30699@debbugs.gnu.org; Fri, 09 Mar 2018 18:24:24 -0500 Original-Received: by mail-wm0-f49.google.com with SMTP id e194so6669817wmd.3 for <30699@debbugs.gnu.org>; Fri, 09 Mar 2018 15:24:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=RS4EZE/B2G31w+A3MgApjc+GT+SzxxgsYSOtmwN7re4=; b=C3kutvvP+Auyiiys8D77SVTeeAhnbbz83WWSCRhAdwRCscEFfQ+a/aW9hKsHMjScEs nhLGbRk2eSAmZdjzaCXTtOUUUJRIDgcrl5RaNxNFCFsc+loeu8ZnNhWSls9Co/bps3+6 BiN7kUHI86wRfzeEenmRDlFm7yIJwi7sI2beZMuLeepSSGIBbBWB8nDOQkXkkV+q72DZ PXpgi4yFRAJsKMB+qG0JeSuTfICEIh+hnNeSBXkvAIjHC0TiXhZmo3cAdaiyJDb0waVv u1+WLZSjhGVx49FmwY7fNKjn/2zWt2VkML7Cu6OttqLAXZVg/iZJC1vSN3umtKcumD0G 3AMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=RS4EZE/B2G31w+A3MgApjc+GT+SzxxgsYSOtmwN7re4=; b=FQp64HKWUXks5/N/4A29qUoKNWF1TlbZMjdW80RVpJUDI8iLFCEYBtyUFUziL1G8yh /t9Vm1cKGcRelzEnXsvL0gbAyRXrqYZ1gxp0bRR3JzDBXbo82EmlQvCOexvLYfDA+QX9 41FRCGUpcgmXhSpgdUklYnItgv+18CpekTPKxx+lW+9ADZf1WQfRPB2oF84BaFMuSSJD PMItZCh7w/5+GaoULo2yMjA8dKxBMhYu0sXmR+msj0kEp9Q363rRdi4T4QYIopkgVozX QkuIMjK7lt7f0u5NlH3K4VIcm3Jq+TOsB2emWT1jF/ysvzLtkkhE/twl5ZqE7k/IWcTd QabQ== X-Gm-Message-State: AElRT7GboyImH6NJBGa8LNAyPGzhNSLI+8K2UBMf5el++zlj4VGYmXYF TWOXxS3p6BvX3KsgHQ+4Ciw= X-Google-Smtp-Source: AG47ELt9HBPGYo0Kz8rN6gL5e5pwi6CgbcpWSRXXjVmygQtFMqRQo2BRoQeNTm75tDzv6n3+r7a/JA== X-Received: by 10.28.32.77 with SMTP id g74mr343934wmg.87.1520637857878; Fri, 09 Mar 2018 15:24:17 -0800 (PST) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-5176-0ba2-62e5-311d.holly.idiocy.org. [2001:8b0:3f8:8129:5176:ba2:62e5:311d]) by smtp.gmail.com with ESMTPSA id e6sm2108268wra.67.2018.03.09.15.24.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Mar 2018 15:24:17 -0800 (PST) Content-Disposition: inline In-Reply-To: <837eqlwf1i.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:144085 Archived-At: On Fri, Mar 09, 2018 at 03:32:09PM +0200, Eli Zaretskii wrote: > > Date: Fri, 9 Mar 2018 12:09:52 +0000 > > From: Alan Third > > Cc: 30699@debbugs.gnu.org, aaronjensen@gmail.com > > > > SO, I think that the SET_GARBAGED_FRAME call in updateFrameSize is > > premature, which probably means my original patch is (surprisingly) > > the correct fix. > > But then what would that fix solve? The above test in expose_frame is > not a bug: if the frame is marked as garbaged (and it must be after > resizing it), then the call to expose_frame cannot possibly DTRT, so > it exits right away without doing anything. We should enter redisplay > soon enough, which will redraw the entire frame. If anything, then > the call to expose_frame in the control flow that reacts to frame > resizing is the one that should be removed, because it's bound to do > nothing useful. > > If removing SET_FRAME_GARBAGED when the frame is resized seems to > solve some problem, then you are likely not really resizing the frame, > or not resizing it significantly enough to show why SET_FRAME_GARBAGED > is really needed. > > Or maybe I'm just missing something. When the window manager resizes the frame it blanks its contents out. This results in a flicker as the full redisplay only happens after the user sees the blanked frame. Removing, or moving, SET_FRAME_GARBAGED allows the frame contents to be redrawn before the user sees the blank frame. What’s displayed is not correct but it’s shown for such a short time that it’s not noticable, at least on my machine, and there is no flicker. It’s not a perfect solution, but it’s better than what we have at the moment, IMO. The other solution I have is to use NSDisableScreenUpdates to prevent updates being flushed to the screen until after redisplay, but that completely breaks resizing with the mouse. If redisplay was able to run during interactive resizing with the mouse then this would work, but that seems to require the NS code to run in its own thread, which looks difficult to implement. -- Alan Third