emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/macterm.c,v


From: YAMAMOTO Mitsuharu
Subject: [Emacs-diffs] Changes to emacs/src/macterm.c,v
Date: Fri, 12 Jan 2007 09:00:24 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     YAMAMOTO Mitsuharu <mituharu>   07/01/12 09:00:24

Index: macterm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/macterm.c,v
retrieving revision 1.201
retrieving revision 1.202
diff -u -b -r1.201 -r1.202
--- macterm.c   9 Jan 2007 08:53:59 -0000       1.201
+++ macterm.c   12 Jan 2007 09:00:24 -0000      1.202
@@ -6572,6 +6572,9 @@
   if (wp != tip_window)
     remove_window_handler (wp);
 
+#if USE_CG_DRAWING
+  mac_prepare_for_quickdraw (f);
+#endif
   DisposeWindow (wp);
   if (wp == tip_window)
     /* Neither WaitNextEvent nor ReceiveNextEvent receives `window
@@ -9052,6 +9055,38 @@
   return result;
 }
 
+#if TARGET_API_MAC_CARBON
+/***** Code to handle C-g testing  *****/
+extern int quit_char;
+extern int make_ctrl_char P_ ((int));
+
+int
+mac_quit_char_key_p (modifiers, key_code)
+     UInt32 modifiers, key_code;
+{
+  UInt32 char_code;
+  unsigned long some_state = 0;
+  Ptr kchr_ptr = (Ptr) GetScriptManagerVariable (smKCHRCache);
+  int c, emacs_modifiers;
+
+  /* Mask off modifier keys that are mapped to some Emacs modifiers.  */
+  key_code |= (modifiers & ~(mac_mapped_modifiers (modifiers)));
+  char_code = KeyTranslate (kchr_ptr, key_code, &some_state);
+  if (char_code & ~0xff)
+    return 0;
+
+  emacs_modifiers = mac_to_emacs_modifiers (modifiers);
+  if (emacs_modifiers & ctrl_modifier)
+    c = make_ctrl_char (char_code);
+
+  c |= (emacs_modifiers
+       & (meta_modifier | alt_modifier
+          | hyper_modifier | super_modifier));
+
+  return c == quit_char;
+}
+#endif
+
 #if USE_CARBON_EVENTS
 /* Obtains the event modifiers from the event ref and then calls
    mac_to_emacs_modifiers.  */
@@ -11607,35 +11642,6 @@
 
 #ifdef MAC_OSX
 void
-mac_check_bundle()
-{
-  extern int inhibit_window_system;
-  extern int noninteractive;
-  CFBundleRef appsBundle;
-
-  /* No need to test if already -nw*/
-  if (inhibit_window_system || noninteractive)
-    return;
-
-  appsBundle = CFBundleGetMainBundle();
-  if (appsBundle != NULL)
-    {
-      CFStringRef cfBI = CFSTR("CFBundleIdentifier");
-      CFTypeRef res = CFBundleGetValueForInfoDictionaryKey(appsBundle, cfBI);
-      /* We found the bundle identifier, now we know we are valid. */
-      if (res != NULL)
-       {
-         CFRelease(res);
-         return;
-       }
-    }
-  /* MAC_TODO:  Have this start the bundled executable */
-
-  /* For now, prevent the fatal error by bringing it up in the terminal */
-  inhibit_window_system = 1;
-}
-
-void
 MakeMeTheFrontProcess ()
 {
   ProcessSerialNumber psn;
@@ -11645,36 +11651,6 @@
   if (err == noErr)
     (void) SetFrontProcess (&psn);
 }
-
-/***** Code to handle C-g testing  *****/
-extern int quit_char;
-extern int make_ctrl_char P_ ((int));
-
-int
-mac_quit_char_key_p (modifiers, key_code)
-     UInt32 modifiers, key_code;
-{
-  UInt32 char_code;
-  unsigned long some_state = 0;
-  Ptr kchr_ptr = (Ptr) GetScriptManagerVariable (smKCHRCache);
-  int c, emacs_modifiers;
-
-  /* Mask off modifier keys that are mapped to some Emacs modifiers.  */
-  key_code |= (modifiers & ~(mac_mapped_modifiers (modifiers)));
-  char_code = KeyTranslate (kchr_ptr, key_code, &some_state);
-  if (char_code & ~0xff)
-    return 0;
-
-  emacs_modifiers = mac_to_emacs_modifiers (modifiers);
-  if (emacs_modifiers & ctrl_modifier)
-    c = make_ctrl_char (char_code);
-
-  c |= (emacs_modifiers
-       & (meta_modifier | alt_modifier
-          | hyper_modifier | super_modifier));
-
-  return c == quit_char;
-}
 #endif /* MAC_OSX */
 
 static void




reply via email to

[Prev in Thread] Current Thread [Next in Thread]