diff --git a/libnotify.go b/libnotify.go index 1845461..679d2ba 100644 --- a/libnotify.go +++ b/libnotify.go @@ -103,9 +103,13 @@ func libNotifyUpdate() { // check for SIGWINCH. If so, move the libnotify clock w, h := me.baseGui.Size() if me.winchW != w || me.winchH != h { + if me.winchW == 0 && me.winchH == 0 { + // this isn't really SIGWINCH. This is the app starting + } else { + log.Printf("gocui: long live SIGWINCH! (w,h) is now (%d,%d)\n", w, h) + } me.winchW = w me.winchH = h - log.Info("handle SIGWINCH!", w, h) me.notify.clock.tk.MoveToOffset(w-me.notify.clock.offsetW, me.notify.clock.offsetH) me.notify.clock.tk.Hide() me.notify.clock.tk.Show() @@ -255,11 +259,13 @@ func sigWinchBG() { var err error tk.v, err = me.baseGui.SetView(tk.cuiName, a, b, c, d, 0) if err == nil { - tk.dumpWidget("drawView() err") - log.Log(ERROR, "drawView() internal plugin error err = nil") + if tk.v == nil { + tk.dumpWidget("drawView() err") + log.Log(ERROR, "drawView() internal plugin error err = nil") + } return } - log.Info("background resized to", a, b, c, d) + log.Log(INFO, "background resized to", a, b, c, d) } // find the "BG" widget and set it to the background on the very very bottom