Skip to content

Commit

Permalink
Attempt to fix intermittent bug on Windows, where cut/paste with exte…
Browse files Browse the repository at this point in the history
…rnal applications would stop working until IDE was restarted. With this fix, the problem still occurs occasionally, but goes away the next time the user tries to cut/paste with an external application, without the need to restart the IDE.
  • Loading branch information
eirikbakke committed Oct 15, 2022
1 parent 1092e96 commit 910f34f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions platform/o.n.bootstrap/src/org/netbeans/NbClipboard.java
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,8 @@ public void eventDispatched(AWTEvent ev) {
if (ev.getID() == WindowEvent.WINDOW_ACTIVATED) {
if( Utilities.isWindows() ) {
systemClipboard.addFlavorListener(this);
// Catch up on any events missed while we were away.
fireChange();
}
anyWindowIsActivated = true;
if (System.currentTimeMillis() - lastWindowDeactivated < 100 &&
Expand Down

0 comments on commit 910f34f

Please sign in to comment.