mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
zombie control
This commit is contained in:
parent
58c9f08880
commit
3e4c62de2f
2 changed files with 22 additions and 1 deletions
|
|
@ -305,7 +305,9 @@ create-gui-menu-bar."))
|
||||||
(defmethod menu-bar-height ((obj clog-obj))
|
(defmethod menu-bar-height ((obj clog-obj))
|
||||||
(let ((app (connection-data-item obj "clog-gui")))
|
(let ((app (connection-data-item obj "clog-gui")))
|
||||||
(if (and app (menu app))
|
(if (and app (menu app))
|
||||||
(height (menu app))
|
(if (in-clog-popup-p obj)
|
||||||
|
0
|
||||||
|
(height (menu app)))
|
||||||
0)))
|
0)))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
@ -328,6 +330,7 @@ create-gui-menu-bar."))
|
||||||
window or nil if not found"))
|
window or nil if not found"))
|
||||||
|
|
||||||
(defmethod window-to-top-by-title ((obj clog-obj) title)
|
(defmethod window-to-top-by-title ((obj clog-obj) title)
|
||||||
|
(window-clean-zombies obj)
|
||||||
(when title
|
(when title
|
||||||
(let ((app (connection-data-item obj "clog-gui"))
|
(let ((app (connection-data-item obj "clog-gui"))
|
||||||
(r nil))
|
(r nil))
|
||||||
|
|
@ -340,6 +343,22 @@ window or nil if not found"))
|
||||||
(windows app))
|
(windows app))
|
||||||
r)))
|
r)))
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; window-clean-zombies ;;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
(defgeneric window-clean-zombies (clog-obj)
|
||||||
|
(:documentation "Clean zombie references to windows that can
|
||||||
|
occur from browsers being closed or crashing. (private)"))
|
||||||
|
|
||||||
|
(defmethod window-clean-zombies ((obj clog-obj))
|
||||||
|
(let ((app (connection-data-item obj "clog-gui")))
|
||||||
|
(maphash (lambda (key value)
|
||||||
|
(declare (ignore key))
|
||||||
|
(unless (window-valid-p value)
|
||||||
|
(remhash key (windows app))))
|
||||||
|
(windows app))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; window-to-top-by-param ;;
|
;; window-to-top-by-param ;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,9 @@
|
||||||
(if pop
|
(if pop
|
||||||
(let ((app (connection-data-item obj "builder-app-data")))
|
(let ((app (connection-data-item obj "builder-app-data")))
|
||||||
(setf (connection-data-item pop "builder-app-data") app)
|
(setf (connection-data-item pop "builder-app-data") app)
|
||||||
|
(set-html-on-close pop "Connection Lost")
|
||||||
(clog-gui-initialize pop :parent-desktop-obj obj)
|
(clog-gui-initialize pop :parent-desktop-obj obj)
|
||||||
|
(add-class pop *builder-window-desktop-class*)
|
||||||
(if open-file
|
(if open-file
|
||||||
(setf (title (html-document pop)) open-file)
|
(setf (title (html-document pop)) open-file)
|
||||||
(setf (title (html-document pop)) "CLOG Builder Source Editor"))
|
(setf (title (html-document pop)) "CLOG Builder Source Editor"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue