Skip to content

Commit

Permalink
Remove no longer needed Toolkit.sync() calls to improve overlay perfo…
Browse files Browse the repository at this point in the history
…rmance
  • Loading branch information
bwRavencl committed Sep 3, 2024
1 parent 17ba1cd commit 743d2aa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/main/java/de/bwravencl/controllerbuddy/gui/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -2430,8 +2430,6 @@ private void repaintOnScreenKeyboardAndOverlay() {
overlayFrameContentPane.validate();
overlayFrameContentPane.repaint();
}

Toolkit.getDefaultToolkit().sync();
}

public void restartLast() {
Expand Down Expand Up @@ -2542,7 +2540,6 @@ public void setOverlayText(final String text) {
}

currentModeLabel.setText(text);
Toolkit.getDefaultToolkit().sync();
});
}

Expand Down Expand Up @@ -3002,7 +2999,6 @@ public void updateOverlayAxisIndicators(final boolean forceRepaint) {

if (repaint) {
progressBar.repaint();
Toolkit.getDefaultToolkit().sync();
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import java.awt.GraphicsEnvironment;
import java.awt.Insets;
import java.awt.Point;
import java.awt.Toolkit;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
Expand Down Expand Up @@ -533,7 +532,6 @@ private void readObject(final ObjectInputStream ignoredStream) throws NotSeriali

private void setFocus(final boolean focus) {
setBorder(focus ? focusedButtonBorder : defaultButtonBorder);
Toolkit.getDefaultToolkit().sync();
}

void setPressed(final boolean pressed) {
Expand Down

0 comments on commit 743d2aa

Please sign in to comment.