# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: C:\Projects\core-main # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: o.n.core/src/org/netbeans/core/TimableEventQueue.java --- o.n.core/src/org/netbeans/core/TimableEventQueue.java Base (BASE) +++ o.n.core/src/org/netbeans/core/TimableEventQueue.java Locally Modified (Based On LOCAL) @@ -94,6 +94,7 @@ private static final int PAUSE = Integer.getInteger("org.netbeans.core.TimeableEventQueue.pause", 15000); // NOI18N private final RequestProcessor.Task TIMEOUT; + private final RequestProcessor.Task WAIT_CURSOR_CHECKER; private volatile long ignoreTill; private volatile long start; private volatile ActionListener stoppable; @@ -105,6 +106,13 @@ this.mainWindow = f; TIMEOUT = RP.create(this); TIMEOUT.setPriority(Thread.MIN_PRIORITY); + WAIT_CURSOR_CHECKER = RP.create(new Runnable() { + @Override + public void run() { + isWaitCursor |= isWaitCursor(); + } + }); + WAIT_CURSOR_CHECKER.setPriority(Thread.MIN_PRIORITY); } static void initialize() { @@ -161,6 +169,8 @@ private void done() { TIMEOUT.cancel(); TIMEOUT.waitFinished(); + WAIT_CURSOR_CHECKER.cancel(); + WAIT_CURSOR_CHECKER.waitFinished(); LOG.log(Level.FINE, "isWait cursor {0}", isWaitCursor); // NOI18N long r; @@ -219,6 +229,9 @@ stoppable = (ActionListener)selfSampler; } isWaitCursor |= isWaitCursor(); + if (!isWaitCursor) { + WAIT_CURSOR_CHECKER.schedule(Math.max(REPORT - QUANTUM, 0)); + } } private static void report(final ActionListener ss, final long time) {