1#include "macosxnative.h"
3#include <AppKit/NSWindow.h>
4#include <AppKit/Appkit.h>
5#include <Availability.h>
9 #if !defined(MAC_OS_X_VERSION_10_14) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_14
10 NSString*
const NSAppearanceNameDarkAqua =
@"NSAppearanceNameDarkAqua";
13 void removeUnwantedMenuItems()
17 if ([NSWindow respondsToSelector:
@selector(allowsAutomaticWindowTabbing)])
19 NSWindow.allowsAutomaticWindowTabbing = NO;
23 bool isMouseCoalescingEnabled()
25 return NSEvent.isMouseCoalescingEnabled;
28 void setMouseCoalescingEnabled(
bool enabled)
30 NSEvent.mouseCoalescingEnabled = enabled;
35 if (@available(macOS 10.14, *))
37 NSAppearanceName appearance =
38 [[NSApp effectiveAppearance] bestMatchFromAppearancesWithNames:@[
39 NSAppearanceNameAqua, NSAppearanceNameDarkAqua
41 return [appearance isEqual:NSAppearanceNameDarkAqua];