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))
|
||||
(let ((app (connection-data-item obj "clog-gui")))
|
||||
(if (and app (menu app))
|
||||
(height (menu app))
|
||||
(if (in-clog-popup-p obj)
|
||||
0
|
||||
(height (menu app)))
|
||||
0)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
@ -328,6 +330,7 @@ create-gui-menu-bar."))
|
|||
window or nil if not found"))
|
||||
|
||||
(defmethod window-to-top-by-title ((obj clog-obj) title)
|
||||
(window-clean-zombies obj)
|
||||
(when title
|
||||
(let ((app (connection-data-item obj "clog-gui"))
|
||||
(r nil))
|
||||
|
|
@ -340,6 +343,22 @@ window or nil if not found"))
|
|||
(windows app))
|
||||
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 ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue