Skip to content

Instantly share code, notes, and snippets.

@mrflip
Forked from pingles/lion_emacs.patch
Created October 9, 2011 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrflip/1274241 to your computer and use it in GitHub Desktop.
Save mrflip/1274241 to your computer and use it in GitHub Desktop.
diff --git a/src/nsterm.m b/src/nsterm.m
index e768c24..5bf6ce3 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1161,8 +1161,10 @@ x_set_window_size (struct frame *f, int change_grav, int cols, int rows)
f->scroll_bar_actual_width = NS_SCROLL_BAR_WIDTH (f);
compute_fringe_widths (f, 0);
+
+ BOOL inFullScreen = ([window styleMask] & NSFullScreenWindowMask) == NSFullScreenWindowMask;
- if ([window isKindOfClass:[EmacsFullWindow class]]) {
+ if ([window isKindOfClass:[EmacsFullWindow class]] || inFullScreen) {
pixelwidth = [[window screen] frame].size.width;
pixelheight = [[window screen] frame].size.height;
}
@@ -5184,6 +5188,11 @@ ns_term_shutdown (int sig)
[win setOpaque: NO];
[self allocateGState];
+
+ NSApplicationPresentationOptions options = [[NSApplication sharedApplication] presentationOptions];
+ [[NSApplication sharedApplication] setPresentationOptions:options | NSApplicationPresentationFullScreen];
+
+ [win setCollectionBehavior:[win collectionBehavior] | NSWindowCollectionBehaviorFullScreenPrimary];
ns_window_num++;
return self;
@mrflip
Copy link
Author

mrflip commented Oct 9, 2011

removed two hunks: the whitespace-only hunk, and the third, which is included in recent HEAD of emacs git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment