forked from macports/macports-ports
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mkconsole: backport fix from upstream for older systems
- Loading branch information
1 parent
e2c7912
commit a022af6
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
aqua/mkconsole/files/2ed541237808b584962cb0ae7485ee3d31a1ca45.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
From 2ed541237808b584962cb0ae7485ee3d31a1ca45 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Marcus=20Mu=CC=88ller?= <[email protected]> | ||
Date: Fri, 16 Aug 2024 16:38:32 +0200 | ||
Subject: [PATCH] Fix build issues for macOS < 10.12 | ||
|
||
--- | ||
MKConsoleWindow.m | 10 +++++++++- | ||
1 file changed, 9 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/MKConsoleWindow.m b/MKConsoleWindow.m | ||
index 6325289..26e5a54 100644 | ||
--- MKConsoleWindow.m | ||
+++ MKConsoleWindow.m | ||
@@ -46,9 +46,17 @@ | ||
@implementation MKConsoleWindow | ||
//--------------------------------------------------------------------------------------- | ||
|
||
+// NOTE: can't use version macro(s) `MAC_OS_VERSION_12_0`/`__MAC_10_12` when | ||
+// compiling on older platforms as it's undefined there - using its value | ||
+// instead! | ||
+#if (MAC_OS_X_VERSION_MAX_ALLOWED < 101200) | ||
+#define NSWindowStyleMaskBorderless NSBorderlessWindowMask | ||
+#define NSWindowStyleMask NSUInteger | ||
+#endif | ||
+ | ||
- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSWindowStyleMask)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag | ||
{ | ||
- self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]; | ||
+ self = [super initWithContentRect:contentRect styleMask:NSWindowStyleMaskBorderless backing:NSBackingStoreBuffered defer:NO]; | ||
NSAssert1(self != nil, @"%s Failed to create window instance", __PRETTY_FUNCTION__); | ||
return self; | ||
} |