summaryrefslogtreecommitdiff
path: root/src/macfns.c
diff options
context:
space:
mode:
authorSteven Tamm <steventamm@mac.com>2004-12-29 17:25:02 +0000
committerSteven Tamm <steventamm@mac.com>2004-12-29 17:25:02 +0000
commit30c92fab793df102666fff234d59377003a79462 (patch)
tree00e78822e7949e23a8d5ad92ef0b08bf52504724 /src/macfns.c
parent2f7717f601c768019ee2a73a7f3535c5de74512b (diff)
downloademacs-30c92fab793df102666fff234d59377003a79462.tar.gz
* term/mac-win.el: Require x-dnd.
(mac-drag-n-drop): Sync with W32 version. Use x-dnd.el functions. * macfns.c (install_window_handler): Modify extern to return OSErr value. (mac_window): Handle return value of install_window_handler. * macterm.c (reflect_byte): Remove function. (mac_create_bitmap_from_bitmap_data): Don't call it. Lookup table instead. (mac_do_font_lists): Simplify calculation of the longest nonspecial string. [TARGET_API_MAC_CARBON] (init_mac_drag_n_drop): Remove function and declaration. (mac_initialize) [TARGET_API_MAC_CARBON]: Don't call it. [TARGET_API_MAC_CARBON] (mac_do_track_drag): New function and declaration. (install_window_handler): Return OSErr value. (install_window_handler) [TARGET_API_MAC_CARBON]: Register handlers for tracking/receiving drag-and-drop items. (do_ae_open_documents): Generate unibyte strings for filenames. [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Likewise. Reject only non-filename items. Set event modifiers. Set return value.
Diffstat (limited to 'src/macfns.c')
-rw-r--r--src/macfns.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/macfns.c b/src/macfns.c
index dfbc5dacd5e..f40e8354f35 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -158,7 +158,7 @@ Lisp_Object Qshift;
extern Lisp_Object Vwindow_system_version;
-#if 0 /* Use xstricmp instead. */
+#if 0 /* Use xstricmp instead. */
/* compare two strings ignoring case */
static int
@@ -2261,7 +2261,7 @@ XParseGeometry (string, x, y, width, height)
/* Create and set up the Mac window for frame F. */
-extern install_window_handler (WindowPtr);
+extern OSErr install_window_handler (WindowPtr);
static void
mac_window (f)
@@ -2282,7 +2282,11 @@ mac_window (f)
if (FRAME_MAC_WINDOW (f))
{
SetWRefCon (FRAME_MAC_WINDOW (f), (long) f->output_data.mac);
- install_window_handler (FRAME_MAC_WINDOW (f));
+ if (install_window_handler (FRAME_MAC_WINDOW (f)) != noErr)
+ {
+ DisposeWindow (FRAME_MAC_WINDOW (f));
+ FRAME_MAC_WINDOW (f) = NULL;
+ }
}
#else
FRAME_MAC_WINDOW (f)