# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1593547823 0 # Node ID fc29c4c2d38667c703bbc389e26772307e6326e5 # Parent 55c6587f269cf84569353a2a5b7a464c242a4ef1 Mac: Changes for supporting Big Sur. These changes don't actually work. The Xcode beta SDK is listed as 10.16, although it has been reported that Big Sur will be 11.0 not 10.16. The 10.16 SDK does not include constants for either 10.16 or 11.0 so I am writing the code as if it will be 11.0. The 10.16 SDK complains that NSBox's setBorderType is deprecated and it seems like the styles don't apply to the box type I am using anyway, so might want to just remove the setBorderType from NSBox and see if it still works on other versions of MacOS, but committing for now so I have this record of it. diff -r 55c6587f269c -r fc29c4c2d386 mac/dw.m --- a/mac/dw.m Tue Jun 30 19:17:41 2020 +0000 +++ b/mac/dw.m Tue Jun 30 20:10:23 2020 +0000 @@ -162,6 +162,11 @@ #define WK_API_ENABLED 1 #endif +/* Handle deprecation of constants in 10.16... */ +#if defined(MAC_OS_X_VERSION_11_0) && ((defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_11_0) || !defined(MAC_OS_X_VERSION_MAX_ALLOWED)) +#define BUILDING_FOR_BIG_SUR +#endif + /* Macros to encapsulate running functions on the main thread * on Mojave or later... and locking mutexes on earlier versions. */ @@ -4441,7 +4446,9 @@ DWBox *thisbox = dw_box_new(type, pad); Box *box = [thisbox box]; +#ifndef BUILDING_FOR_BIG_SUR [groupbox setBorderType:NSBezelBorder]; +#endif [groupbox setTitle:[NSString stringWithUTF8String:title]]; box->grouphwnd = groupbox; [groupbox setContentView:thisbox]; @@ -6387,8 +6394,9 @@ NSBox *border = [[NSBox alloc] init]; NSTextField *textfield = dw_text_new(text, cid); +#ifndef BUILDING_FOR_BIG_SUR [border setBorderType:NSGrooveBorder]; - //[border setBorderType:NSLineBorder]; +#endif [border setTitlePosition:NSNoTitle]; [border setContentView:textfield]; [border setContentViewMargins:NSMakeSize(1.5,1.5)];