mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
make converted condition match the previous logic
This commit is contained in:
@@ -564,7 +564,7 @@ public class IdeEventQueue extends EventQueue {
|
||||
enterSuspendModeIfNeeded(e);
|
||||
}
|
||||
|
||||
myKeyboardBusy = myKeyboardEventsInTheQueue.get() != 0;
|
||||
myKeyboardBusy = e instanceof KeyEvent || myKeyboardEventsInTheQueue.get() != 0;
|
||||
|
||||
if (e instanceof KeyEvent) {
|
||||
if (e.getID() == KeyEvent.KEY_RELEASED && ((KeyEvent)e).getKeyCode() == KeyEvent.VK_SHIFT) {
|
||||
|
||||
@@ -26,12 +26,10 @@ public class IdeEventQueueTest extends PlatformTestCase {
|
||||
public void testManyEvents() {
|
||||
int N = 100000;
|
||||
PlatformTestUtil.startPerformanceTest("Event queue dispatch", 10000, () -> {
|
||||
AtomicInteger count = new AtomicInteger();
|
||||
UIUtil.dispatchAllInvocationEvents();
|
||||
for (int i=0;i<N;i++) {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
count.incrementAndGet();
|
||||
});
|
||||
AtomicInteger count = new AtomicInteger();
|
||||
for (int i = 0; i < N; i++) {
|
||||
SwingUtilities.invokeLater(count::incrementAndGet);
|
||||
}
|
||||
UIUtil.dispatchAllInvocationEvents();
|
||||
assertEquals(N, count.get());
|
||||
|
||||
Reference in New Issue
Block a user