Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/lisp/cus-start.el b/lisp/cus-start.el
- index 4df6781243..5afd89a473 100644
- --- a/lisp/cus-start.el
- +++ b/lisp/cus-start.el
- @@ -558,6 +558,7 @@ minibuffer-prompt-properties--setter
- (mac-pass-command-to-system mac boolean "22.1")
- (mac-pass-control-to-system mac boolean "22.1")
- (mac-drawing-use-gcd mac boolean "24.4")
- + (mac-use-title-bar mac boolean "25.2")
- (mac-frame-tabbing mac (choice (const automatic) (const inverted)
- (const nil) (const t)) "24.5")
- (debug-on-event debug
- diff --git a/src/macappkit.m b/src/macappkit.m
- index b3905f12a9..6ddecb9a9a 100644
- --- a/src/macappkit.m
- +++ b/src/macappkit.m
- @@ -1824,6 +1824,16 @@ - (void)showMenuBar
- @implementation EmacsWindow
- +- (BOOL)canBecomeKeyWindow
- +{
- + return YES;
- +}
- +
- +- (BOOL)canBecomeMainWindow
- +{
- + return [self isVisible];
- +}
- +
- - (instancetype)initWithContentRect:(NSRect)contentRect
- styleMask:(NSWindowStyleMask)windowStyle
- backing:(NSBackingStoreType)bufferingType
- @@ -2190,9 +2200,13 @@ - (void)setupWindow
- else
- {
- windowClass = [EmacsWindow class];
- - windowStyle = (NSWindowStyleMaskTitled | NSWindowStyleMaskClosable
- - | NSWindowStyleMaskMiniaturizable
- - | NSWindowStyleMaskResizable);
- + if (mac_use_title_bar)
- + windowStyle = (NSWindowStyleMaskTitled | NSWindowStyleMaskClosable
- + | NSWindowStyleMaskMiniaturizable
- + | NSWindowStyleMaskResizable);
- + else
- + windowStyle = (NSWindowStyleMaskBorderless | NSWindowStyleMaskResizable
- + | NSWindowStyleMaskMiniaturizable);
- }
- }
- else
- diff --git a/src/macterm.c b/src/macterm.c
- index 6c406e664e..926f0bafbf 100644
- --- a/src/macterm.c
- +++ b/src/macterm.c
- @@ -6168,4 +6168,14 @@ tabbing is disallowed and preferred, respectively.
- This variable has no effect on OS X 10.11 and earlier. */);
- Vmac_frame_tabbing = Qautomatic;
- +
- + DEFVAR_BOOL ("mac-use-title-bar", mac_use_title_bar,
- + doc: /*Non-nil means to include the title bar on frames. Nil means to
- +omit the title bar on OSX >= 10.7. This variable is ignored on OSX <
- +10.7. Note that the first frame per emacs session (unless it is an
- +emacsclient) will use the default value of this variable (nil--do not
- +include a title bar), ignoring (!) the user-set value of this
- +variable. This is almost certainly due to a bug in the patch adding
- +this variable. Default is nil.*/);
- + mac_use_title_bar = false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement