mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user