diff options
| author | Jeff Carr <[email protected]> | 2025-03-10 23:38:43 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-10 23:38:43 -0500 |
| commit | 3acf47379260f2503ec12cd1d168df724d242bba (patch) | |
| tree | 144438ad53d759f7eb23c8b323263845adad1143 /libnotify.go | |
| parent | 6c3149c0fee314991960d88117c70f62b25f6e9c (diff) | |
Diffstat (limited to 'libnotify.go')
| -rw-r--r-- | libnotify.go | 14 |
1 files changed, 10 insertions, 4 deletions
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 |
