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#32932: 27.0.50; render bugs on macOS Mojave Date: Sun, 4 Nov 2018 20:11:48 +0000 Message-ID: <20181104201148.GA70884@breton.holly.idiocy.org> References: <83tvl0hdn6.fsf@gnu.org> <20181101225519.GA40584@breton.holly.idiocy.org> <837ehufqxw.fsf@gnu.org> <20181103203635.GB41015@breton.holly.idiocy.org> <83muqpeuw0.fsf@gnu.org> <20181104132404.GA58336@breton.holly.idiocy.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 1541362208 18554 195.159.176.226 (4 Nov 2018 20:10:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Nov 2018 20:10:08 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: boris@d12frosted.io, 32932@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 Sun Nov 04 21:10:04 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 1gJOih-0004he-7R for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Nov 2018 21:10:03 +0100 Original-Received: from localhost ([::1]:60109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJOkn-0001uD-Fz for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Nov 2018 15:12:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJOkg-0001u3-Ta for bug-gnu-emacs@gnu.org; Sun, 04 Nov 2018 15:12:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJOkd-0007YG-NL for bug-gnu-emacs@gnu.org; Sun, 04 Nov 2018 15:12:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58271) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gJOkc-0007VR-1D for bug-gnu-emacs@gnu.org; Sun, 04 Nov 2018 15:12:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gJOkb-0007Cr-SF for bug-gnu-emacs@gnu.org; Sun, 04 Nov 2018 15:12:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Nov 2018 20:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32932 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32932-submit@debbugs.gnu.org id=B32932.154136231927692 (code B ref 32932); Sun, 04 Nov 2018 20:12:01 +0000 Original-Received: (at 32932) by debbugs.gnu.org; 4 Nov 2018 20:11:59 +0000 Original-Received: from localhost ([127.0.0.1]:34296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJOkZ-0007CZ-9u for submit@debbugs.gnu.org; Sun, 04 Nov 2018 15:11:59 -0500 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:33937) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJOkY-0007CN-2O for 32932@debbugs.gnu.org; Sun, 04 Nov 2018 15:11:58 -0500 Original-Received: by mail-wr1-f46.google.com with SMTP id j26-v6so7238306wre.1 for <32932@debbugs.gnu.org>; Sun, 04 Nov 2018 12:11:58 -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=qi/e5nyxtarUKA7wxcZYQarx+28a1NkalWQHEm40l8g=; b=WH2ZhamTBat8HRjaRsIhRyp7XHutwk9R/OBaF8F0zbcTZ0ORGT7HlBWI8bDHcFjbcz sd1g3NFEMzYwtAYswnsfKY5tDkTl5Vgq1GmK/3CNOmwAxsV47JtAvdBtWMAcc1zn7jjb Oc8odvLaIlv5kgIPAd83xOICE2CnQTsCzZ/Yn5/t5FenIF4rb0pyuwjZpGrBpfEwSLFT xUNli6W9MmBhLx2su+vnauEWksiDslhSmBMbk3+5DVQuUbLbCgNNU6jhOIjEXnxbm6as zrbMmjscg0MxhmnsDkgCBU8s+1xgSTBAP6eUr3rEMde5s9JEld1CDvlLfqsTPvLtcu35 4Ltg== 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=qi/e5nyxtarUKA7wxcZYQarx+28a1NkalWQHEm40l8g=; b=CgtfL12+oaWbhFumYumlayqaAQbaFH7X1W3wPDni1uhyJsD5m02k/ubmqZS7nuR9pv 2XNAzapEeQMDAs+9q+b+h0o0G1uDCdndjK2cqu0VWq4Fmk+IdLVcNILaHrmJIOdRAOIe C0rdUXf5ELf2v38yINRan+bQeEJubSE/4UZLuXAKW9hEbnTrjPUrKaaOYULakLjhteZw Wfh0z98UakowsH215oLz/F070RTomgk02cufEitHrc+089JMf2qDLJY3aKZnikKffpY1 c4eza2/LU88Zn/+mxDgGiG6QddxAuMgpAirw9NMy07A3aL+trTdGzRrtJMHHKHAqRphg hskg== X-Gm-Message-State: AGRZ1gI3BH4qfpSRI5tCOkQQ48ho813rQca4CO8hgGMDMsAo10f+Is3U kWqMzQDKnH8aKmnWSs4zZeo= X-Google-Smtp-Source: AJdET5cYXJ+AqeXqIwPLynUfyo+UbGZcFinD/V+MQ1U851yET70+0qFbSZNpitPIMtAZczWe3PcF6g== X-Received: by 2002:a5d:5045:: with SMTP id h5-v6mr17435113wrt.210.1541362312239; Sun, 04 Nov 2018 12:11:52 -0800 (PST) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-8cfe-35d9-62a3-d426.holly.idiocy.org. [2001:8b0:3f8:8129:8cfe:35d9:62a3:d426]) by smtp.gmail.com with ESMTPSA id w17-v6sm10034882wmc.39.2018.11.04.12.11.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Nov 2018 12:11:51 -0800 (PST) Content-Disposition: inline In-Reply-To: <20181104132404.GA58336@breton.holly.idiocy.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:152027 Archived-At: 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