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: Wed, 7 Mar 2018 20:26:03 +0000 Message-ID: <20180307202603.GA31176@breton.holly.idiocy.org> References: <83d10jtd5m.fsf@gnu.org> <834llutstx.fsf@gnu.org> <83tvtus8rc.fsf@gnu.org> <20180305192331.GA26656@breton.holly.idiocy.org> <83muzms3i6.fsf@gnu.org> <20180306225502.GA30546@breton.holly.idiocy.org> <83a7vjre52.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 1520454371 18670 195.159.176.226 (7 Mar 2018 20:26:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 7 Mar 2018 20:26:11 +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 Wed Mar 07 21:26:07 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 1etfdG-0002FX-4q for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Mar 2018 21:25:50 +0100 Original-Received: from localhost ([::1]:35469 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etffI-0002PN-Sw for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Mar 2018 15:27:56 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etfeV-0001h6-Au for bug-gnu-emacs@gnu.org; Wed, 07 Mar 2018 15:27:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etfeQ-0005J6-HZ for bug-gnu-emacs@gnu.org; Wed, 07 Mar 2018 15:27:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41964) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1etfeQ-0005Ih-Ce for bug-gnu-emacs@gnu.org; Wed, 07 Mar 2018 15:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1etfeQ-0008Sf-3p for bug-gnu-emacs@gnu.org; Wed, 07 Mar 2018 15:27: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: Wed, 07 Mar 2018 20:27: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.152045437532461 (code B ref 30699); Wed, 07 Mar 2018 20:27:02 +0000 Original-Received: (at 30699) by debbugs.gnu.org; 7 Mar 2018 20:26:15 +0000 Original-Received: from localhost ([127.0.0.1]:49861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1etfdf-0008RU-BZ for submit@debbugs.gnu.org; Wed, 07 Mar 2018 15:26:15 -0500 Original-Received: from mail-wr0-f175.google.com ([209.85.128.175]:44965) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1etfdb-0008RE-TD for 30699@debbugs.gnu.org; Wed, 07 Mar 2018 15:26:12 -0500 Original-Received: by mail-wr0-f175.google.com with SMTP id v65so3475699wrc.11 for <30699@debbugs.gnu.org>; Wed, 07 Mar 2018 12:26:11 -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=/qnshr/21Sy8X1Qhz0VRm66qPn+dCodHu4a/oPI2wt0=; b=VxcVUNbzACg7OqN9k0U5G2RS4KzNyicrDClIGf2v1vmo/9g073E5DWs/9mTu9nU504 TZyuCE4Ysi1qpzlqQB02mFqTue0kvUW2BVWAgu6yS0VW3cC9MCGxvdXpx8C8L71yUYKk /e07xXSK4gTmWeMeevSmdTdB6J2es+KDZXZEUzvOkXDgvy7uOABWwqdFMsgAMZHKWYIu +kHbg9ODyWLhR5i8h3WdHfBxyVJWIYXpQRc4p6iACCzyPjpUi2JojemAYIlCLG9miGRi L/2wRjOHsfxJ/Dk5X4UukqJfnrqj02oGzbIdUHSPyLKz41NqrS2uHibxMgdkVnh7JFb2 ARQg== 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=/qnshr/21Sy8X1Qhz0VRm66qPn+dCodHu4a/oPI2wt0=; b=VMmuHdZz+Dd1gMt4jhUxWmXT3CVa6DbdxvlEFpfbtRU72PrfQr+dBKYuHcz1sN2Hcs N9XjHVnH/4qoztwyYt+uDAOqydXXdqje3uTYN+tWh/8x5yxhuv1hD6we1P0OjjxU8N6K EgEceZb/43Ni6NxFy+DOjQmNsXm9NdrYjXXNA2FSEJFXpAf3aY+lJnYz6mS5WEavL8Zb Z1OnxJugW5fidYTF41ZPYObrSwmk210hj3VdAnj3AKD79Q3e9f41sm6i5vMDLQ9meGta kL1BgkBgwvg1vKMU3Ou0d+mlbgA0SmuIR/PzbUjyyZ6butVNV3306lULRYXQyyc33zr4 xkkA== X-Gm-Message-State: APf1xPC87+Rzq6VIXnP0hprwW3d5PKhEKg8FxT25BaaMa0Cxttge2OjI TszDmeRQFs3vguU6w5Bei7w5oYb0 X-Google-Smtp-Source: AG47ELuTLF3/k1GgRcN2qxGRGtSS5fnjd7RdMlAoVc6etJn0fEESYpFLyBddzDZVeioYbMvmyxVE7w== X-Received: by 10.223.158.69 with SMTP id v5mr20503746wre.142.1520454366227; Wed, 07 Mar 2018 12:26:06 -0800 (PST) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-e8d9-a19c-5d74-f7c1.holly.idiocy.org. [2001:8b0:3f8:8129:e8d9:a19c:5d74:f7c1]) by smtp.gmail.com with ESMTPSA id s21sm16222229wra.45.2018.03.07.12.26.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Mar 2018 12:26:05 -0800 (PST) Content-Disposition: inline In-Reply-To: <83a7vjre52.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:143991 Archived-At: On Wed, Mar 07, 2018 at 07:26:01PM +0200, Eli Zaretskii wrote: > > I’ve tried adding calls to NSDisableScreenUpdates and > > NSEnableScreenUpdates in redisplay_internal, just to see if it works, > > but I couldn’t get it to work at all: I always saw the blanked frame. > > Either these functions don’t work as advertised or there’s something > > else going on. It’s quite probable I’ve misunderstood > > redisplay_internal. > > If you tell me where did you try to add these calls and perhaps also > what was your mental model of what redisplay_internal does when you > did that, I might be able to help you add this in the right places > (assuming the idea is workable, and I trust your expertise on that). updateFrameSize in nsterm.m calls SET_FRAME_GARBAGED, which appears to just flag the frame for clearing. My assumption was that redisplay first checks if the frame is garbaged and if so clears it, then redraws the contents of the frame. I put the calls to NS(En|Dis)ableScreenUpdates at the start and end of redisplay_internal: modified src/xdisp.c @@ -13868,7 +13868,7 @@ redisplay_internal (void) redisplaying_p = true; block_buffer_flips (); specbind (Qinhibit_free_realized_faces, Qnil); - + ns_disable_screen_updates (); /* Record this function, so it appears on the profiler's backtraces. */ record_in_backtrace (Qredisplay_internal_xC_functionx, 0, 0); @@ -14602,7 +14602,7 @@ redisplay_internal (void) #endif if (interrupt_input && interrupts_deferred) request_sigio (); - + ns_enable_screen_updates (); unbind_to (count, Qnil); RESUME_POLLING; } I realise this isn’t robust, but I was just testing it out. I imagine my failure here is that ns_clear_frame isn’t called from redisplay at all, but somewhere else. -- Alan Third