Skip to content

Instantly share code, notes, and snippets.

@lululau
Created March 31, 2017 15:03
Show Gist options
  • Save lululau/637a140d0a9b2dd053db3769909bf808 to your computer and use it in GitHub Desktop.
Save lululau/637a140d0a9b2dd053db3769909bf808 to your computer and use it in GitHub Desktop.
--- mituharu-emacs-mac-b5e5c4a6234d/src/macappkit.m 2017-02-04 13:21:43.000000000 +0800
+++ mituharu-emacs-mac/src/macappkit.m 2017-03-31 22:58:41.000000000 +0800
@@ -1824,6 +1824,14 @@
@implementation EmacsWindow
++ (NSButton *)standardWindowButton:(NSWindowButton)b forStyleMask:(NSWindowStyleMask)styleMask
+{
+ if(b == NSWindowDocumentIconButton || b == NSWindowDocumentVersionsButton) {
+ return nil;
+ }
+ return [NSWindow standardWindowButton:b forStyleMask:styleMask];
+}
+
- (instancetype)initWithContentRect:(NSRect)contentRect
styleMask:(NSWindowStyleMask)windowStyle
backing:(NSBackingStoreType)bufferingType
@@ -2267,6 +2275,8 @@
[window setOpaque:NO];
FRAME_BACKGROUND_ALPHA_ENABLED_P (f) = true;
}
+ window.titlebarAppearsTransparent = true;
+ window.appearance = [NSAppearance appearanceNamed: NSAppearanceNameVibrantDark];
[[window contentView] addSubview:emacsView];
[self updateBackingScaleFactor];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment