From ed4fcbcd8696e429f13c4542dc84bb4f6b4a32f1 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 1 Dec 2016 19:35:22 +0100 Subject: [PATCH] prioritize any edt activity because when a user clicks somewhere (an InputEvent is posted, but not yet dispatched), but EDT is busy, it should finish its activities ASAP --- .../platform-impl/src/com/intellij/ide/IdeEventQueue.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ide/IdeEventQueue.java b/platform/platform-impl/src/com/intellij/ide/IdeEventQueue.java index 02f183a96ba6..bc5dc9c12c64 100644 --- a/platform/platform-impl/src/com/intellij/ide/IdeEventQueue.java +++ b/platform/platform-impl/src/com/intellij/ide/IdeEventQueue.java @@ -355,14 +355,10 @@ public class IdeEventQueue extends EventQueue { boolean wasInputEvent = myIsInInputEvent; myIsInInputEvent = isInputEvent(e); - if (myIsInInputEvent) { - HeavyProcessLatch.INSTANCE.prioritizeUiActivity(); - } else { - HeavyProcessLatch.INSTANCE.stopThreadPrioritizing(); - } AWTEvent oldEvent = myCurrentEvent; myCurrentEvent = e; + HeavyProcessLatch.INSTANCE.prioritizeUiActivity(); try (AccessToken ignored = startActivity(e)) { _dispatchEvent(e, false); } @@ -370,6 +366,7 @@ public class IdeEventQueue extends EventQueue { processException(t); } finally { + HeavyProcessLatch.INSTANCE.stopThreadPrioritizing(); myIsInInputEvent = wasInputEvent; myCurrentEvent = oldEvent;