GNU bug report logs -
#38083
27.0.50; Deprecation warnings in NS build
Previous Next
Reported by: Pankaj Jangid <pankaj.jangid <at> gmail.com>
Date: Wed, 6 Nov 2019 05:27:01 UTC
Severity: normal
Tags: moreinfo
Found in version 27.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #13 received at 38083 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> 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.
This bug report was last modified 3 years and 86 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.