Skip to content

Instantly share code, notes, and snippets.

@jimeh
Created June 4, 2012 11:08
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 jimeh/2867761 to your computer and use it in GitHub Desktop.
Save jimeh/2867761 to your computer and use it in GitHub Desktop.
# Taken from Homebrew Emacs formula on 4-Jun-2012: http://bit.ly/LscRSk
#
# The following are the descriptions from the formula for this patch:
#
# - Fix for building with Xcode 4; harmless on Xcode 3.x.
# - Fix for the titlebar issue on Mac OS X 10.7
#
diff --git a/src/nsterm.m b/src/nsterm.m
index 30b73c2..234b8b5 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5107,6 +5107,9 @@ ns_term_shutdown (int sig)
win = [[EmacsWindow alloc]
initWithContentRect: r
styleMask: (NSResizableWindowMask |
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
+ NSTitledWindowMask |
+#endif
NSMiniaturizableWindowMask |
NSClosableWindowMask)
backing: NSBackingStoreBuffered
# Fix for Shift key for IME users
diff --git a/src/nsterm.m b/src/nsterm.m
index 30b73c2..f0c154e 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -4489,6 +4489,7 @@ ns_term_shutdown (int sig)
/* if it was a function key or had modifiers, pass it directly to emacs */
if (fnKeysym || (emacs_event->modifiers
+ && (emacs_event->modifiers != shift_modifier)
&& [[theEvent charactersIgnoringModifiers] length] > 0))
/*[[theEvent characters] length] */
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment