Advertisement
Guest User

Untitled

a guest
Apr 29th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. diff --git a/lisp/cus-start.el b/lisp/cus-start.el
  2. index 4df6781243..5afd89a473 100644
  3. --- a/lisp/cus-start.el
  4. +++ b/lisp/cus-start.el
  5. @@ -558,6 +558,7 @@ minibuffer-prompt-properties--setter
  6. (mac-pass-command-to-system mac boolean "22.1")
  7. (mac-pass-control-to-system mac boolean "22.1")
  8. (mac-drawing-use-gcd mac boolean "24.4")
  9. + (mac-use-title-bar mac boolean "25.2")
  10. (mac-frame-tabbing mac (choice (const automatic) (const inverted)
  11. (const nil) (const t)) "24.5")
  12. (debug-on-event debug
  13. diff --git a/src/macappkit.m b/src/macappkit.m
  14. index b3905f12a9..6ddecb9a9a 100644
  15. --- a/src/macappkit.m
  16. +++ b/src/macappkit.m
  17. @@ -1824,6 +1824,16 @@ - (void)showMenuBar
  18.  
  19. @implementation EmacsWindow
  20.  
  21. +- (BOOL)canBecomeKeyWindow
  22. +{
  23. + return YES;
  24. +}
  25. +
  26. +- (BOOL)canBecomeMainWindow
  27. +{
  28. + return [self isVisible];
  29. +}
  30. +
  31. - (instancetype)initWithContentRect:(NSRect)contentRect
  32. styleMask:(NSWindowStyleMask)windowStyle
  33. backing:(NSBackingStoreType)bufferingType
  34. @@ -2190,9 +2200,13 @@ - (void)setupWindow
  35. else
  36. {
  37. windowClass = [EmacsWindow class];
  38. - windowStyle = (NSWindowStyleMaskTitled | NSWindowStyleMaskClosable
  39. - | NSWindowStyleMaskMiniaturizable
  40. - | NSWindowStyleMaskResizable);
  41. + if (mac_use_title_bar)
  42. + windowStyle = (NSWindowStyleMaskTitled | NSWindowStyleMaskClosable
  43. + | NSWindowStyleMaskMiniaturizable
  44. + | NSWindowStyleMaskResizable);
  45. + else
  46. + windowStyle = (NSWindowStyleMaskBorderless | NSWindowStyleMaskResizable
  47. + | NSWindowStyleMaskMiniaturizable);
  48. }
  49. }
  50. else
  51. diff --git a/src/macterm.c b/src/macterm.c
  52. index 6c406e664e..926f0bafbf 100644
  53. --- a/src/macterm.c
  54. +++ b/src/macterm.c
  55. @@ -6168,4 +6168,14 @@ tabbing is disallowed and preferred, respectively.
  56.  
  57. This variable has no effect on OS X 10.11 and earlier. */);
  58. Vmac_frame_tabbing = Qautomatic;
  59. +
  60. + DEFVAR_BOOL ("mac-use-title-bar", mac_use_title_bar,
  61. + doc: /*Non-nil means to include the title bar on frames. Nil means to
  62. +omit the title bar on OSX >= 10.7. This variable is ignored on OSX <
  63. +10.7. Note that the first frame per emacs session (unless it is an
  64. +emacsclient) will use the default value of this variable (nil--do not
  65. +include a title bar), ignoring (!) the user-set value of this
  66. +variable. This is almost certainly due to a bug in the patch adding
  67. +this variable. Default is nil.*/);
  68. + mac_use_title_bar = false;
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement