From e7caf5085b834cb3dc30bfc058507c8ee0e653bf Mon Sep 17 00:00:00 2001 From: David Botton Date: Mon, 15 Feb 2021 10:17:02 -0500 Subject: [PATCH] reset default locations when all windows closed --- clog-gui.lisp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clog-gui.lisp b/clog-gui.lisp index 9010fb2..30cc1bc 100644 --- a/clog-gui.lisp +++ b/clog-gui.lisp @@ -504,6 +504,10 @@ on-window-resize-done at end of resize.")) (let ((app (connection-data-item obj "clog-gui"))) (unless html-id (setf html-id (clog-connection:generate-id))) + (when (eql (hash-table-count (windows app)) 0) + ;; If previously no open windows reset default position + (setf (last-x app) 0) + (setf (last-y app) 0)) (unless left ;; Generate sensible initial x location (setf left (last-x app))