From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#38083: 27.0.50; Deprecation warnings in NS build Date: Fri, 20 May 2022 19:52:58 +0800 Message-ID: <87ilq0whd1.fsf@yahoo.com> References: <874k1k4g9d.fsf@gnus.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4860"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: Pankaj Jangid , 38083@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 20 13:54:15 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ns1Cx-00013R-Ej for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 May 2022 13:54:15 +0200 Original-Received: from localhost ([::1]:60282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ns1Cw-0007Zw-Ax for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 May 2022 07:54:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ns1Ck-0007ZP-DQ for bug-gnu-emacs@gnu.org; Fri, 20 May 2022 07:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43958) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ns1Ck-0004g9-4d for bug-gnu-emacs@gnu.org; Fri, 20 May 2022 07:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ns1Ck-0006N4-4E for bug-gnu-emacs@gnu.org; Fri, 20 May 2022 07:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 May 2022 11:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38083 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 38083-submit@debbugs.gnu.org id=B38083.165304759924434 (code B ref 38083); Fri, 20 May 2022 11:54:02 +0000 Original-Received: (at 38083) by debbugs.gnu.org; 20 May 2022 11:53:19 +0000 Original-Received: from localhost ([127.0.0.1]:37855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ns1C3-0006M2-7b for submit@debbugs.gnu.org; Fri, 20 May 2022 07:53:19 -0400 Original-Received: from sonic310-23.consmr.mail.ne1.yahoo.com ([66.163.186.204]:35986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ns1C2-0006Lo-0L for 38083@debbugs.gnu.org; Fri, 20 May 2022 07:53:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1653047592; bh=0psTDwkOS433mRrOoUb+l6G7H2adTK4ZNgAgnN5+tKc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=t3S8s/9uaWM01vS2oqAbYH0wqoLdetRCCwisffYO8REhcdjwRWjzFkHT8W9yNkKQ7UiAgqKA/XaOQqQ7IUHJnjdaagV2nnR6AMBvz4OGVUcYmoCkXDPbRjuOitfBq5q9jMiv1UUU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JExw v9qEThP5riICy1QxDbDh2PJibyCLgrm30LTH3O1mgCeayszmg9Z9B4P1ctifnbdPtoNGQP7wqWR5 6Pj9sZWhFTyz0Mlo8rJMwf0SnaIz3AcSCdpYJ_.MTU1hCsWe.wM7AG..Ut2H4tC8R3XV4fvrU.lt zqx_DXZGc9_XmllPaxHZupuKKhBhAqxfsX7Y53eUcCXcrveB4xcAd6NIvXamBevpa5xfz.uZIKl4 PqrE_YKbJi.hNhlHk2RsaARdEA7TmOCTl2y3pXGXsXNpcg2iSxeSZiyM8NfAy5aSs7rg1wrHBtya nTqrQK90oNJ5hTs3pyU4UH1nrHox2BjZmSCK0.ORL23bI4Jy5dZuX2QNXOK5TX.VnjqFi.tt3hLC gfbbV5rPusWk82ooYjowHcnRnRaXGyLOGBpbAxOlBpQy2zR8Ild_f6B7dNzXnV6bcqd7zdPEool6 Xjg6EN_OVgQA0Q1OLPS69f5.hHWHfhvV7QnATjGe93 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Fri, 20 May 2022 11:53:12 +0000 Original-Received: by hermes--canary-production-sg3-7959d4d9bd-b4hml (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 9efc0aedbb49898f2b9b85c9e2b6c80a; Fri, 20 May 2022 11:53:05 +0000 (UTC) In-Reply-To: <874k1k4g9d.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 20 May 2022 13:04:14 +0200") X-Mailer: WebService/1.1.20225 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:232744 Archived-At: Lars Ingebrigtsen writes: >> There are several deprecation warnings in NS build. Good thing is that, >> these are confined to just two files - nsterm.o and nsselect.o. I've >> copied following warnings from the build output, >> >> CC nsterm.o >> nsterm.m:2771:26: warning: 'scrollRect:by:' is deprecated: first deprecated in macOS 10.14 - Use NSScrollView to achieve scrolling views. [-Wdeprecated-declarations] >> [FRAME_NS_VIEW (f) scrollRect: src by: delta]; > > [etc] > > I haven't checked whether these are still present in Emacs 29, but > perhaps Po Lu has some input here; added to the CCs. I don't know about the nsselect ones, but we have this in nsterm.m now: #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 double scale = [[self window] backingScaleFactor]; CGContextRef context = [(EmacsLayer *)[self layer] getContext]; int bpp = CGBitmapContextGetBitsPerPixel (context) / 8; void *pixels = CGBitmapContextGetData (context); int rowSize = CGBitmapContextGetBytesPerRow (context); int srcRowSize = NSWidth (srcRect) * scale * bpp; void *srcPixels = (char *) pixels + (int) (NSMinY (srcRect) * scale * rowSize + NSMinX (srcRect) * scale * bpp); void *dstPixels = (char *) pixels + (int) (dest.y * scale * rowSize + dest.x * scale * bpp); if (NSIntersectsRect (srcRect, dstRect) && NSMinY (srcRect) < NSMinY (dstRect)) for (int y = NSHeight (srcRect) * scale - 1 ; y >= 0 ; y--) memmove ((char *) dstPixels + y * rowSize, (char *) srcPixels + y * rowSize, srcRowSize); else for (int y = 0 ; y < NSHeight (srcRect) * scale ; y++) memmove ((char *) dstPixels + y * rowSize, (char *) srcPixels + y * rowSize, srcRowSize); #else So we are off the hook now, since scrollRect is no longer used on Mac OS X 10.14 and later.