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 12:09:52 +0000 Message-ID: <20180309120952.GA45581@breton.holly.idiocy.org> References: <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> <20180307202603.GA31176@breton.holly.idiocy.org> <83r2ounzty.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 1520597449 19765 195.159.176.226 (9 Mar 2018 12:10:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Mar 2018 12:10:49 +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 Fri Mar 09 13:10:45 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 1euGrF-00053q-8v for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Mar 2018 13:10:45 +0100 Original-Received: from localhost ([::1]:44755 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euGtI-0003gB-7b for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Mar 2018 07:12:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euGra-0002eU-6m for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 07:11:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euGrW-00042n-Vt for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 07:11:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43891) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1euGrW-00042f-QV for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 07:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1euGrW-0000Ll-Ey for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 07:11: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 12:11: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.15205974031266 (code B ref 30699); Fri, 09 Mar 2018 12:11:02 +0000 Original-Received: (at 30699) by debbugs.gnu.org; 9 Mar 2018 12:10:03 +0000 Original-Received: from localhost ([127.0.0.1]:51788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1euGqY-0000KL-Pi for submit@debbugs.gnu.org; Fri, 09 Mar 2018 07:10:03 -0500 Original-Received: from mail-wr0-f171.google.com ([209.85.128.171]:37081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1euGqW-0000Jl-Ka for 30699@debbugs.gnu.org; Fri, 09 Mar 2018 07:10:01 -0500 Original-Received: by mail-wr0-f171.google.com with SMTP id z12so8794529wrg.4 for <30699@debbugs.gnu.org>; Fri, 09 Mar 2018 04:10:00 -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=zyjuBwbnzM5Mv3UqPZ9VmHIz/CEIusn0FUTWrKk1Xzw=; b=B/v3gIf+Vt4MKIfYQL85EzDUAy+p64I43rFlvyr7eoFSh9Gz7Z1oLJyxPeYXJvfcLC 8KLnACH2O61ay/MfL+7e22pyrE2BML1WDxrMldne9ll8pYPLTWqDBbNA1d/fd5eBqAjH tQnVNP5ljI1IxhosGqoROOqdqSs0EHs5aCAQ87kdNCXlk9W2841D3XPxNdBdjLodgKDQ 26vLQojaKxtW3Paiw8sbihynQAet9grhkIcB4A9uYsXK+rq4uP/RyC8VxGNQtLBiGqfu h2WMz9JBMjO6jWGe9UtOsfkYeypJpa29AI2wSA/bRukVBCRbvXfMr1gwafk6VdXJy7x0 b7oA== 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=zyjuBwbnzM5Mv3UqPZ9VmHIz/CEIusn0FUTWrKk1Xzw=; b=gbIIvtH+jsa3ESwuLtmDx4/xhheiv5TeShU6nnEY+6WegWfTpI80UGDHGAK6PgtKAp hkdP3/yOzJjJMY5NK/eDTa6vo4K1PXZx6tVxk6hHbDy/PH6WyLeJSR49DQ4cat30ZFd8 l7n1htbpq1Z0IZ9YdBD9FgsWvYX2Zc24c4DjE/yjc78jp5OubbU55qmfgV+OK9B/sr6a FGjtKsCDo+zLrm9liv3J5mEzWSfCe20k8Gn46Ky1oBdynfFlSSbcFhYgtbqO7R8R51xT mfosXON33dulelpnNJAK4+kmGHJQ4h4gKzYfKGtKNjfTnR5IzXOYEDttSkiLBP6hDfnA f9Zg== X-Gm-Message-State: APf1xPDtYV7QVAgnX/OjZID9mg/HptHCxLlJnk7rNFKtWSxRt3Jw0VI1 jdDJazybr7oOlntPMKQychY= X-Google-Smtp-Source: AG47ELtwzRuAboUrsr6P68lR0K6/DNshOJRfv17FgonVO/mHy6MZ0fXw5Mjc6NYyo12yijA4TvI2cQ== X-Received: by 10.223.190.17 with SMTP id n17mr24130604wrh.189.1520597394693; Fri, 09 Mar 2018 04:09:54 -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 l22sm1213061wre.52.2018.03.09.04.09.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Mar 2018 04:09:54 -0800 (PST) Content-Disposition: inline In-Reply-To: <83r2ounzty.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:144067 Archived-At: On Thu, Mar 08, 2018 at 09:15:37PM +0200, Eli Zaretskii wrote: > > Date: Wed, 7 Mar 2018 20:26:03 +0000 > > From: Alan Third > > Cc: 30699@debbugs.gnu.org, aaronjensen@gmail.com > > > > updateFrameSize in nsterm.m calls SET_FRAME_GARBAGED, which appears to > > just flag the frame for clearing. I *finally* worked out what’s going on here. After updateFrameSize is called we end up in x_set_window_size: [window setFrame: wr display: YES]; That resizes and blanks the frame, then asks it to redraw, which takes us, eventually, to drawRect, which does: ns_clear_frame_area (emacsframe, x, y, width, height); block_input (); expose_frame (emacsframe, x, y, width, height); unblock_input (); ns_clear_frame_area does nothing here because the frame is already blank, and expose_frame doesn’t redraw anything because the first thing it does is: /* No need to redraw if frame will be redrawn soon. */ if (FRAME_GARBAGED_P (f)) { TRACE ((stderr, " garbaged\n")); return; } SO, I think that the SET_GARBAGED_FRAME call in updateFrameSize is premature, which probably means my original patch is (surprisingly) the correct fix. Possibly with the addition of SET_GARBAGED_FRAME after the call to setFrame in x_set_window_size, although it makes no obvious difference here. -- Alan Third