Skip to content

Commit

Permalink
fix(extract) run Swing code on the EDT
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenraven authored and Spasi committed Jan 12, 2025
1 parent da8f218 commit d9ec785
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions modules/extract/src/main/kotlin/org/lwjgl/extract/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import javax.swing.event.*
import javax.swing.plaf.basic.*

fun main() {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName())

System.setProperty("line.separator", "\n")

if (Configuration.LLVM_CLANG_LIBRARY_NAME.get() == null) {
Expand All @@ -34,8 +32,12 @@ fun main() {
}
}

val app = Application()
app.frame.isVisible = true
SwingUtilities.invokeLater {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName())

val app = Application()
app.frame.isVisible = true
}
}

private fun checkModal() = Window.getWindows().none { it is Dialog && it.isModal && it.isVisible }
Expand Down

0 comments on commit d9ec785

Please sign in to comment.