diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2012-02-17 13:44:12 -0800 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2012-02-24 11:34:23 -0800 |
commit | a43eb7357328fbd6666cbab459dcf074f99c6136 (patch) | |
tree | 01551e5eef424d8685305d39665880d4377ec94c | |
parent | 62159b3a31defe150ab1ff108a306d32df47aa02 (diff) |
XQuartz: Short-circuit activateX:server-1.10-branch
This also avoids a deadlock when calling activateX: before the server
thread has initialized
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit cb6a32da27f09261c4d561c19d1877c750d98cc3)
Conflicts:
hw/xquartz/X11Application.m
-rw-r--r-- | hw/xquartz/X11Application.m | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index b64ca1dce..213618aaa 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -190,7 +190,11 @@ static void message_kit_thread (SEL selector, NSObject *arg) { - (void) activateX:(OSX_BOOL)state { size_t i; - DEBUG_LOG("state=%d, _x_active=%d, \n", state, _x_active) + + if (_x_active == state) + return; + + DEBUG_LOG("state=%d, _x_active=%d, \n", state, _x_active); if (state) { if(bgMouseLocationUpdated) { DarwinSendPointerEvents(darwinPointer, MotionNotify, 0, bgMouseLocation.x, bgMouseLocation.y, 0.0, 0.0, 0.0); |