/* The single script context used for all script executions. */
static OSAID as_script_context;
+#if TARGET_API_MAC_CARBON
+static int wakeup_from_rne_enabled_p = 0;
+#define ENABLE_WAKEUP_FROM_RNE (wakeup_from_rne_enabled_p = 1)
+#define DISABLE_WAKEUP_FROM_RNE (wakeup_from_rne_enabled_p = 0)
+#else
+#define ENABLE_WAKEUP_FROM_RNE 0
+#define DISABLE_WAKEUP_FROM_RNE 0
+#endif
+
#ifndef MAC_OSX
static OSErr posix_pathname_to_fsspec P_ ((const char *, FSSpec *));
static OSErr fsspec_to_posix_pathname P_ ((const FSSpec *, char *, int));
BLOCK_INPUT block, in case that some input has already been read
asynchronously. */
BLOCK_INPUT;
+ ENABLE_WAKEUP_FROM_RNE;
if (!detect_input_pending ())
{
#if TARGET_API_MAC_CARBON
}
#endif /* not TARGET_API_MAC_CARBON */
}
+ DISABLE_WAKEUP_FROM_RNE;
UNBLOCK_INPUT;
if (err == noErr)
BLOCK_INPUT block, in case that some input has already been read
asynchronously. */
BLOCK_INPUT;
+ ENABLE_WAKEUP_FROM_RNE;
if (!detect_input_pending ())
{
EMACS_TIME select_timeout;
kEventLeaveInQueue, NULL);
}
}
+ DISABLE_WAKEUP_FROM_RNE;
UNBLOCK_INPUT;
if (r != 0)
BLOCK_INPUT block, in case that some input has already been
read asynchronously. */
BLOCK_INPUT;
+ ENABLE_WAKEUP_FROM_RNE;
if (!detect_input_pending ())
{
int minfd, fd;
CFRunLoopRemoveSource (runloop, source, kCFRunLoopDefaultMode);
}
}
+ DISABLE_WAKEUP_FROM_RNE;
UNBLOCK_INPUT;
if (err == noErr || err == eventLoopQuitErr)
}
#endif /* MAC_OSX */
+#if TARGET_API_MAC_CARBON
+void
+mac_wakeup_from_rne ()
+{
+ if (wakeup_from_rne_enabled_p)
+ /* Post a harmless event so as to wake up from
+ ReceiveNextEvent. */
+ mac_post_mouse_moved_event ();
+}
+#endif
void
syms_of_mac ()