Closed MatthewRock closed 8 years ago
I've poked around the code, but I have no idea what's wrong. I've tried changing the #'standard-window closure by creating a function that resets %cached-window, then change #'finalize so that each time my program ends, the %cached-window gets rebound, but this didn't solve the problem. Same with using (gc) in between the calls to #'test. Moreover, the program looks similarly to what I've got in C. Any ideas?
Probably you should refresh window before retrieving width/height like:
(defun test ()
(charms:with-curses ()
(charms:refresh-window cl-charms:*standard-window*)
(multiple-value-bind (width height) (charms:window-dimensions cl-charms:*standard-window*)
(sleep 3)
(print (list width height)))))
Fixed by @MatthewRock in 06859f597189f36bf0ebc6acadddf2247c0234f6
This code snippet is the smallest isolated case of bug I can find:
Bug description: The bug prevents window dimensions from being updated properly - it prints dimensions from previous window.
Steps to reproduce:
Result: (proper-x proper-y) (old-x old-y) (proper-x proper-y)
Expected: (proper-x proper-y) x 3
I'm running SBCL 1.3.4 with cl-charms-20160318-git, downloaded with quicklisp.