diff --git a/cmd/cbxv/main.go b/cmd/cbxv/main.go index e616587..ab7788d 100644 --- a/cmd/cbxv/main.go +++ b/cmd/cbxv/main.go @@ -13,7 +13,7 @@ import ( const ( NAME = "cbxv" - VERSION = "0.5.2" + VERSION = "0.5.3" ) // Update listens for messages on the message channel and diff --git a/internal/ui/ui.go b/internal/ui/ui.go index 464810b..d8aaad0 100644 --- a/internal/ui/ui.go +++ b/internal/ui/ui.go @@ -39,10 +39,12 @@ func NewUI(m *model.Model, messenger util.Messenger) *UI { }) u.MainWindow.Connect("window-state-event", func(w *gtk.Window, event *gdk.Event) bool { ev := gdk.EventWindowStateNewFromEvent(event) - if ev.ChangedMask() & ev.NewWindowState() == gdk.WINDOW_STATE_FULLSCREEN { - u.SendMessage(util.Message{TypeName: "setFullscreen", Data: "true"}) - } else { - u.SendMessage(util.Message{TypeName: "setFullscreen", Data: "false"}) + if ev.ChangedMask() & gdk.WINDOW_STATE_FULLSCREEN != 0 { + if ev.NewWindowState() & gdk.WINDOW_STATE_FULLSCREEN != 0 { + u.SendMessage(util.Message{TypeName: "setFullscreen", Data: "true"}) + } else { + u.SendMessage(util.Message{TypeName: "setFullscreen", Data: "false"}) + } } return true })