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: Thu, 8 Nov 2018 15:21:17 +0000 Message-ID: <20181108152117.GA98842@breton.holly.idiocy.org> References: <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> <20181104201148.GA70884@breton.holly.idiocy.org> <20181105185516.GA71125@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 1541690472 19866 195.159.176.226 (8 Nov 2018 15:21:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Nov 2018 15:21:12 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 32932@debbugs.gnu.org, boris@d12frosted.io To: Aaron Jensen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 08 16:21: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 1gKm7G-0004zY-Fm for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Nov 2018 16:21:06 +0100 Original-Received: from localhost ([::1]:57482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKm9M-0000sH-Vk for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Nov 2018 10:23:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKm8E-0006EX-TJ for bug-gnu-emacs@gnu.org; Thu, 08 Nov 2018 10:22:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKm8B-0002k8-P7 for bug-gnu-emacs@gnu.org; Thu, 08 Nov 2018 10:22:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37550) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gKm8A-0002iv-3g for bug-gnu-emacs@gnu.org; Thu, 08 Nov 2018 10:22:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gKm89-0000Cm-Tk for bug-gnu-emacs@gnu.org; Thu, 08 Nov 2018 10:22: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: Thu, 08 Nov 2018 15:22: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.1541690491745 (code B ref 32932); Thu, 08 Nov 2018 15:22:01 +0000 Original-Received: (at 32932) by debbugs.gnu.org; 8 Nov 2018 15:21:31 +0000 Original-Received: from localhost ([127.0.0.1]:41808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKm7f-0000Bx-7z for submit@debbugs.gnu.org; Thu, 08 Nov 2018 10:21:31 -0500 Original-Received: from mail-wr1-f47.google.com ([209.85.221.47]:35573) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKm7c-0000Bi-TH for 32932@debbugs.gnu.org; Thu, 08 Nov 2018 10:21:29 -0500 Original-Received: by mail-wr1-f47.google.com with SMTP id z16-v6so21677202wrv.2 for <32932@debbugs.gnu.org>; Thu, 08 Nov 2018 07:21:28 -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=QBMXZjnH2aUcpu9OPdWEj9XuyFMxTGVnFIb5S3Wxdg4=; b=SE+/mJbEY3B0hhsvsMMMEGJseDesFS+JWTHAP0IXjfLWwvsjmgRPcXBiMgWl63rilr rFpdVOmtVWcP3Wed/6qVfrq7tlA1PrVK5zTt9BCTLZdXylV4SjPdOgWPYpZe199PcCpB lCxvpPTKEplGorHDLR0SMoX78xMuyD2Y63Z/cA7Qer4bdhrY5jtsf9tSJ9RrHkXCnKat kM4gE8bZFhSMdm1BAzxup7gdYLMptd1kY6QagR2YY6ueKJjjiU6CvgDdtdVsBqQhjuLp QYjwmIjcY81HPvD5Sv5XuBXbUKwuamlTyDUi9hdMXom4FqPkiOW3avylowzu2Kd2BQ00 gPzA== 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=QBMXZjnH2aUcpu9OPdWEj9XuyFMxTGVnFIb5S3Wxdg4=; b=Sg4zB/kO0faVsYj+4sDEBEYKiCXX7PhNsin8JwE66Mgwy1y0Yk0InhRCQ3EJmXNoce AqnTBJBdk9WhF92RpVXC9Z7dCP2jDEPp/dkWiMkIO2nbcfr0I+zRElEaej0xnL0Suxll umXIekVLVJfPQa7RIvfpgSjk9OqjmPGw8f0GcQPUs8hyBc97EC6/j0GrqQ6VLlrZu0Z2 C2zLh/fZj5Kc99azVhcmkNPRQ1GGPo8as5RZU+m7d5PA6kpmHf2Zi3qbOQsEtS7zhGpy 5LA2UPkjI+QfcxQMc4DaZc6RffoKzMhLlIVZOP4S75BSeV5WeOKIGHfvqYddE43RBfWi nc9g== X-Gm-Message-State: AGRZ1gKW6Hr/dq0SpXqyI17sJOlbczHQUr0KyorkDsIB2QjRWNDpSjtP UFJUhIyLor3yaZcw/oHTvms= X-Google-Smtp-Source: AJdET5dn0CXnKK+D7Mp11yyc2EGpcGH7bq5WhaoroNZeahtaj0tk2iELU3bZDnRfZIbruv6nxFAD6w== X-Received: by 2002:a5d:6091:: with SMTP id w17-v6mr4690552wrt.193.1541690482947; Thu, 08 Nov 2018 07:21:22 -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 p125-v6sm1240591wmp.2.2018.11.08.07.21.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Nov 2018 07:21:19 -0800 (PST) Content-Disposition: inline In-Reply-To: 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:152164 Archived-At: I’ve finally worked out what’s happening. We have an NSWindow, that is opaque, and drawn over that is the NSView we use to display Emacs, which is not opaque. When we ask for a display Cocoa/GNUstep back up to the first opaque ancestor, in this case the NSWindow, and draws it, then moves up to the NSView and draws it. This means the first thing it does is draw the blank NSWindow contents, which is why anything that is marked as dirty gets blanked out. Setting the NSView to be opaque solves the blanking issue, but ns_clear_area and friends don’t do anything as they’re not called during expose_frame. We could work around that by queueing up the clear requests and calling them in drawRect, however if the user set the background to be transparent then I think we would immediately run into the exact same issue as we have now where the first opaque ancestor (the WM root) will overdraw when we’re not expecting it. I think the root of this problem is that the NS toolkits expect drawRect to ALWAYS be able to redraw the contents of the view at any time so they have no issue with modifying it. Emacs seems to expect the contents of the window to remain intact in many of these circumstances. We could try and force Emacs to bend to the NS way by forcing expose_frame and friends to draw WHENEVER REQUESTED, but I don’t know how practical that is, and it would mean making changes in xdisp.c which may be unwelcome. This leaves us with the solution Yamamoto Mitsuharu has used in the Mac port of drawing to an offscreen buffer and leaving drawRect to basically just copy that buffer to the screen. It doesn’t feel like as neat a solution, but it should, more or less, Just Work. Although I currently have no idea how to do it. -- Alan Third