Index: main/grid/display.lisp
===================================================================
--- main/grid/display.lisp	(revision main,39)
+++ main/grid/display.lisp	(revision main,53)
@@ -16,5 +16,5 @@
   (make-instance 'grid
                  :data data
-                 :column-widths column-widths
+                 :column-widths (coerce column-widths 'vector)
                  :header-rows header-rows
                  :header-columns header-columns
@@ -62,5 +62,5 @@
     (let ((text (item grid row column))
           (x (column-offset grid column)))
-      (cdk::move-and-add-string main-window row x text))))
+      (move-and-add-string main-window row x text))))
 
 (defun draw-header-top-item (grid row column)
@@ -68,5 +68,5 @@
     (let ((text (item grid row column))
           (x (column-offset grid column)))
-      (cdk::move-and-add-string main-window row x text))))
+      (move-and-add-string main-window row x text))))
 
 (defun draw-item (grid row column)
@@ -76,5 +76,5 @@
           (y (+ row y-scroll)))
       (let ((x (+ column-offset x-scroll)))
-        (cdk::move-and-add-string window y x text)))))
+        (move-and-add-string window y x text)))))
 
 ;;;; ------------------------------------------------- ;;;;
@@ -91,5 +91,5 @@
     (dotimes (i header-rows)
       (draw-cell grid i column i x))
-    (dotimes (i (- (cdk::getmaxy window) header-rows))
+    (dotimes (i (- (size window) header-rows))
       (let* ((y (+ i header-rows))
              (row (+ y row-scroll)))
@@ -100,5 +100,5 @@
 (defun draw (grid)
   (with-slots (data column-widths header-columns window column-scroll) grid
-    (cdk::c-erase-window window)
+    (erase window)
     (let ((x 0))
       (dotimes (i header-columns)
@@ -107,5 +107,5 @@
       (do ((i (+ header-columns column-scroll) (incf i)))
           ((or (>= i (columns data))
-               (> x (cdk::getmaxx window))))
+               (> x (nth-value 1 (size window)))))
         (draw-column grid i x)
         (incf x (svref column-widths i))))))
@@ -115,5 +115,5 @@
 (defmethod max-row-scroll ((grid grid))
   (with-slots (data header-rows window) grid
-    (max 0 (- (rows data) (cdk::getmaxy window)))))
+    (max 0 (- (rows data) (size window)))))
 
 (defmethod (setf row-scroll) :around (i (grid grid))
