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, 4 Oct 2018 22:51:54 +0100 Message-ID: <20181004215154.GA15008@breton.holly.idiocy.org> References: <20181004182514.GA5667@breton.holly.idiocy.org> <20181004184549.GC5667@breton.holly.idiocy.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="FCuugMFkClbJLl1L" Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1538689873 21531 195.159.176.226 (4 Oct 2018 21:51:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 4 Oct 2018 21:51:13 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 32932@debbugs.gnu.org To: Aaron Jensen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 04 23:51:09 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 1g8BWW-0005VU-QR for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Oct 2018 23:51:09 +0200 Original-Received: from localhost ([::1]:60083 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8BYd-0000AC-6u for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Oct 2018 17:53:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8BYQ-00009U-0c for bug-gnu-emacs@gnu.org; Thu, 04 Oct 2018 17:53:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8BYM-00048B-Ov for bug-gnu-emacs@gnu.org; Thu, 04 Oct 2018 17:53:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32896) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g8BYM-00047o-Hf for bug-gnu-emacs@gnu.org; Thu, 04 Oct 2018 17:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g8BYM-0000Ap-9S for bug-gnu-emacs@gnu.org; Thu, 04 Oct 2018 17:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Oct 2018 21:53:02 +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.1538689925574 (code B ref 32932); Thu, 04 Oct 2018 21:53:02 +0000 Original-Received: (at 32932) by debbugs.gnu.org; 4 Oct 2018 21:52:05 +0000 Original-Received: from localhost ([127.0.0.1]:37154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8BXR-00009C-5K for submit@debbugs.gnu.org; Thu, 04 Oct 2018 17:52:05 -0400 Original-Received: from mail-wr1-f42.google.com ([209.85.221.42]:46124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8BXP-00008f-NH for 32932@debbugs.gnu.org; Thu, 04 Oct 2018 17:52:04 -0400 Original-Received: by mail-wr1-f42.google.com with SMTP id a2-v6so4416933wrc.13 for <32932@debbugs.gnu.org>; Thu, 04 Oct 2018 14:52:03 -0700 (PDT) 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=69m6Wdt0jHsj+0+fc1BhKsaJPoO94mq7w8U4700Jygs=; b=ZPAarmQZGg3X4Kw+0jwHivtAnEZ5EfexdZXwGNIkUWvRnFmcfIylj7IEQX1zCm8/dc WraLOVxf2kiBZeGrzPN/p7jPbOYrndHDB1RSo6yPblNS0Ua/v4UGPOIdR7USEFyomWsk aVnAa2LDtP/UIbajOIq7aIkuAVtJSW+gZztv5eiaD2gmXGdBk9OGSF1M9oronDAmeA3b 5ejDm2kDmAp4i1CikM+f6eNS1P8I+RRW8IXUjnfUOILknhfxKl5aVruR0VDPq1aQe02v 5bNQUyxQcRi3TADddpN290VRg9JXR9nTOe1CdgsJLU2AnXuppC+q6EHNFKy6+KWOUaOw ka+A== 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=69m6Wdt0jHsj+0+fc1BhKsaJPoO94mq7w8U4700Jygs=; b=JBlgix0lrVkm5aVe5UvEK22juglteCAcLc/sVamGAHJfomhHWlW3D+EWaR1GKzveIH dIedzhZbi/YEiRSXFwDzCXyHPLJOp5kqPyoYXLf6T9DEmiKAuHML6dupK6HLpBI+5Vwf qWvUZrdQ5/HCKV2A4a4i/NvEmXmESe3GcR2B3S3zrLRH55wJzCq1p1w0c/cWBgvarPmV d1R/H250R2xLFPBlCseP/eSqyxSR4D40jCLNACxT/HDzr9jxIXIjh7Tt0I1OcZd7PyFf rLjvVodn6D9udVsNbOHv+ZzS5dqCeezeo/2TRs32QPK6vbyyrjv83+TWIfq0AgFb+q0h yrkw== X-Gm-Message-State: ABuFfoghxxeH9uuUIZR6ZC13ehhyQSrPZPA5aSbqDktM4oE2L9uBoqra B47AjvuB0/1JGDcjcCJb5kk= X-Google-Smtp-Source: ACcGV63eHZigSYFafQ0ftUt7O3jj9UPxsgXlENOfkhPbgZsdoHHjYXcldr9MVHwDamfwQz8MW2vuSg== X-Received: by 2002:a5d:5588:: with SMTP id i8-v6mr5900190wrv.38.1538689917850; Thu, 04 Oct 2018 14:51:57 -0700 (PDT) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-ed2c-4f7b-d8aa-3675.holly.idiocy.org. [2001:8b0:3f8:8129:ed2c:4f7b:d8aa:3675]) by smtp.gmail.com with ESMTPSA id y184-v6sm32800wmg.17.2018.10.04.14.51.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Oct 2018 14:51:56 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20181004184549.GC5667@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:150945 Archived-At: --FCuugMFkClbJLl1L Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Thu, Oct 04, 2018 at 07:45:49PM +0100, Alan Third wrote: > You lost the bug tracker again. > > On Thu, Oct 04, 2018 at 11:34:41AM -0700, Aaron Jensen wrote: > > On October 4, 2018 at 11:25:19 AM, Alan Third > > (alan@idiocy.org(mailto:alan@idiocy.org)) wrote: > > > > > Is it possible that ‘one line’ is the same as the height of the title > > > bar? > > > > That’s possible, yes. > > > > > Sorry, I was unclear. I meant the compiler warnings etc. But since > > > Charles sees this on 10.6 it’s unlikely it’s something new in the > > > compilation. > > > > > > All I can think of to do is enable NSTRACE and see if you can spot > > > some commonality when the problem happens. > > > > Any particular groups you want me to include in the trace? > > No. It’s possible that updates and focus could give some extra clue, > but they also might just end up littering the output with nonsense. Can you try the attached patch? I noticed that nested calls to ns_clip_to_row would probably fail to reset the graphics context correctly (and therefore the clipping areas for drawing). I’ve no idea if that’s actually a problem for us, though. -- Alan Third --FCuugMFkClbJLl1L Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Fix-occasional-redraw-error-bug-32932.patch" >From e81bf671f31663359e2572e8c183f3a4d7e5f708 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Thu, 4 Oct 2018 22:47:23 +0100 Subject: [PATCH] Fix occasional redraw error (bug#32932) * src/nsterm.m (ns_clip_to_rect, ns_reset_clipping): Always pop the graphics state. --- src/nsterm.m | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index d92d6c3244..72ad57c64d 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -277,7 +277,6 @@ - (NSColor *)colorUsingDefaultColorSpace /* display update */ static int ns_window_num = 0; -static BOOL gsaved = NO; static BOOL ns_fake_keydown = NO; #ifdef NS_IMPL_COCOA static BOOL ns_menu_bar_is_hidden = NO; @@ -1180,7 +1179,6 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen) NSRectClipList (r, 2); else NSRectClip (*r); - gsaved = YES; return YES; } @@ -1204,11 +1202,7 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen) { NSTRACE_WHEN (NSTRACE_GROUP_FOCUS, "ns_reset_clipping"); - if (gsaved) - { - [[NSGraphicsContext currentContext] restoreGraphicsState]; - gsaved = NO; - } + [[NSGraphicsContext currentContext] restoreGraphicsState]; } -- 2.18.0 --FCuugMFkClbJLl1L--