Commit 85797aa5 authored by Nikolay Igotti's avatar Nikolay Igotti

Don't crash on Linux.

parent e96142bc
...@@ -52,8 +52,11 @@ fun createWindow(title: String) { ...@@ -52,8 +52,11 @@ fun createWindow(title: String) {
menu.add(menuItem) menu.add(menuItem)
window.setJMenuBar(menuBar) window.setJMenuBar(menuBar)
try {
java.awt.Desktop.getDesktop().setDefaultMenuBar(menuBar) java.awt.Desktop.getDesktop().setDefaultMenuBar(menuBar)
} catch (e: UnsupportedOperationException) {
// Not all platforms allow this.
}
val state = State() val state = State()
state.text = title state.text = title
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment