mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 10:40:45 -08:00
keep window list acurate
This commit is contained in:
parent
3e4c62de2f
commit
de49facca5
1 changed files with 12 additions and 3 deletions
|
|
@ -353,10 +353,17 @@ occur from browsers being closed or crashing. (private)"))
|
|||
|
||||
(defmethod window-clean-zombies ((obj clog-obj))
|
||||
(let ((app (connection-data-item obj "clog-gui")))
|
||||
(when (window-select app)
|
||||
(setf (inner-html (window-select app)) ""))
|
||||
(maphash (lambda (key value)
|
||||
(declare (ignore key))
|
||||
(unless (window-valid-p value)
|
||||
(remhash key (windows app))))
|
||||
(if (window-valid-p value)
|
||||
(when (window-select app)
|
||||
(setf (window-select-item value)
|
||||
(create-option (window-select app)
|
||||
:content (window-title value)
|
||||
:selected t
|
||||
:value key)))
|
||||
(remhash key (windows app))))
|
||||
(windows app))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
@ -584,6 +591,8 @@ Only one instance allowed."))
|
|||
(app (connection-data-item obj "clog-gui")))
|
||||
(change-class window-select 'clog-gui-menu-window-select)
|
||||
(setf (window-select app) window-select)
|
||||
(set-on-click window-select (lambda (obj)
|
||||
(window-clean-zombies obj)))
|
||||
(set-on-change window-select (lambda (obj)
|
||||
(let ((win (gethash (value obj) (windows app))))
|
||||
(if (window-valid-p win)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue