diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index f3e784ca..4526e5b2 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -179,6 +179,7 @@ video tutorials. - Ali Sherief - Yoshiki Shibukawa - Dmitri Shuralyov + - Daniel Sieger - Daniel Skorupski - Bradley Smith - Cliff Smolinsky diff --git a/README.md b/README.md index 84c9ed05..a010ae04 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,7 @@ information on what to include when reporting a bug. ## Changelog + - [Cocoa] Bugfix: `kUTTypeURL` was deprecated in macOS 12.0 (#2003) - [X11] Bugfix: Dynamic loading on OpenBSD failed due to soname differences - [Wayland] Added support for key names via xkbcommon - [Wayland] Bugfix: Key repeat could lead to a race condition (#1710) diff --git a/src/cocoa_platform.h b/src/cocoa_platform.h index 1d7c03c6..abeca53c 100644 --- a/src/cocoa_platform.h +++ b/src/cocoa_platform.h @@ -62,6 +62,10 @@ typedef void* id; #define NSWindowStyleMaskTitled NSTitledWindowMask #endif +#if MAC_OS_X_VERSION_MIN_REQUIRED < 101300 + #define NSPasteboardTypeURL NSURLPboardType +#endif + typedef VkFlags VkMacOSSurfaceCreateFlagsMVK; typedef VkFlags VkMetalSurfaceCreateFlagsEXT; diff --git a/src/cocoa_window.m b/src/cocoa_window.m index a8add172..15f9c40e 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -361,9 +361,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 }; markedText = [[NSMutableAttributedString alloc] init]; [self updateTrackingAreas]; - // NOTE: kUTTypeURL corresponds to NSPasteboardTypeURL but is available - // on 10.7 without having been deprecated yet - [self registerForDraggedTypes:@[(__bridge NSString*) kUTTypeURL]]; + [self registerForDraggedTypes:@[NSPasteboardTypeURL]]; } return self;