diff --git a/bin/nwg-drawer b/bin/nwg-drawer index 6e66d75..ef09f50 100755 Binary files a/bin/nwg-drawer and b/bin/nwg-drawer differ diff --git a/main.go b/main.go index a3418f8..8f2b182 100644 --- a/main.go +++ b/main.go @@ -162,8 +162,13 @@ func main() { if *resident { // As win.Show() called from inside a goroutine randomly crashes GTK, // let's just set e helper variable here. We'll be checking it with glib.TimeoutAdd. - log.Debug("SIGUSR1 received, showing the window") - showWindowTrigger = true + if !win.IsVisible() { + log.Debug("SIGUSR1 received, showing the window") + showWindowTrigger = true + } else { + log.Debug("SIGUSR1 received, hiding the window") + restoreStateAndHide() + } } else { log.Info("SIGUSR1 received, and I'm not resident, bye bye") gtk.MainQuit()