diff --git a/ui/mainwindow_init.go b/ui/mainwindow_init.go index 18c9376..1271126 100644 --- a/ui/mainwindow_init.go +++ b/ui/mainwindow_init.go @@ -36,6 +36,14 @@ func (m *MainWindow) Initialize() { m.window.Connect("configure-event", m.checkPositionAndSize) + // Additional OS-specific initialization. + if runtime.GOOS == "windows" { + m.initializeWin() + } + if runtime.GOOS == "darwin" { + m.initializeMac() + } + // Restoring window position. var win_pos_x_str string = "0" var win_pos_y_str string = "0" @@ -145,14 +153,6 @@ func (m *MainWindow) Initialize() { m.window.Add(m.vbox) - // Additional Windows-related initialization. - if runtime.GOOS == "windows" { - m.initializeWin() - } - if runtime.GOOS == "darwin" { - m.initializeMac() - } - m.window.ShowAll() // Launch events.