     }
   }
   if invalidated {
+    var w: Int32 = 0
+    var h: Int32 = 0
+    SDL_GetWindowSize(win, &w, &h)
+    if w != lastWidth || h != lastHeight {
+      lastWidth = w
+      lastHeight = h
+      textGrid.changeScreenSize(w, height: h)
+    }
     SDL_SetRenderDrawColor(rend, 255, 255, 255, 255)
     SDL_RenderClear(rend)
     let msgResult = SDL_RenderCopy(rend, msg, nil, &msgRect)

  var cellHeight: Int32 = 0
  var renderer: COpaquePointer
  var backgroundColor: SDL_Color? = nil

  init(renderer: COpaquePointer, font: COpaquePointer) {
    self.renderer = renderer

//   SDL_Delay(16)
}

p("about to quit")
