From 0bbfee73b560d4231e59fb79608683632946a314 Mon Sep 17 00:00:00 2001 From: Laurent Sansonetti Date: Sun, 10 Jun 2012 10:17:10 +0200 Subject: [PATCH] fix the home button bug --- bin/sim.m | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/bin/sim.m b/bin/sim.m index fc39e8dd..5ef96a4d 100644 --- a/bin/sim.m +++ b/bin/sim.m @@ -270,6 +270,9 @@ refresh_repl_prompt(NSString *top_level, bool clear) previous_prompt_length = strlen(rl_prompt); } +#define CONCURRENT_BEGIN dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ +#define CONCURRENT_END }); + static CGEventRef event_tap_cb(CGEventTapProxy proxy, CGEventType type, CGEventRef event, void *ctx) @@ -277,12 +280,14 @@ event_tap_cb(CGEventTapProxy proxy, CGEventType type, CGEventRef event, static bool previousHighlight = false; if (!(CGEventGetFlags(event) & kCGEventFlagMaskCommand)) { +CONCURRENT_BEGIN if (previousHighlight) { [delegate replEval:[NSString stringWithFormat: @"<