mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-03 04:37:29 +01:00
- refactored function to find or remove window's children.
This commit is contained in:
parent
cff5637057
commit
4997832fd3
@ -2081,6 +2081,8 @@
|
||||
:calculate
|
||||
:draw
|
||||
:aabb
|
||||
:child-window-exists-p
|
||||
:remove-child-window
|
||||
:remove-intersecting-window
|
||||
:draw-all
|
||||
:refresh-config-all
|
||||
|
@ -429,10 +429,9 @@
|
||||
|
||||
(defmethod process-event ((object remove-notify-user-event))
|
||||
(let ((win (payload object)))
|
||||
(when (mtree:find-child-if specials:*main-window*
|
||||
(lambda (node) (eq node win)))
|
||||
(when (windows:child-window-exists-p specials:*main-window* win)
|
||||
(windows:win-close win)
|
||||
(mtree:remove-child specials:*main-window* win))))
|
||||
(windows:remove-child-window specials:*main-window* win))))
|
||||
|
||||
(defclass change-window-title-event (program-event)
|
||||
((window
|
||||
|
@ -283,6 +283,10 @@ height, position and so on)"
|
||||
|
||||
(defgeneric aabb (object))
|
||||
|
||||
(defgeneric child-window-exists-p (object child-window))
|
||||
|
||||
(defgeneric remove-child-window (object child-window))
|
||||
|
||||
(defmethod refresh-config (object)
|
||||
object)
|
||||
|
||||
@ -357,6 +361,13 @@ height, position and so on)"
|
||||
(h (win-height object)))
|
||||
(2d-utils:make-iaabb2 x y (1- (+ x w)) (1- (+ y h)))))
|
||||
|
||||
(defmethod child-window-exists-p ((object wrapper-window) child-window)
|
||||
(mtree:find-child-if object
|
||||
(lambda (node) (eq node child-window))))
|
||||
|
||||
(defmethod remove-child-window ((object wrapper-window) child-window)
|
||||
(mtree:remove-child object child-window))
|
||||
|
||||
(defun remove-intersecting-window (&key (discarded-window-type '()))
|
||||
(labels ((copy-subwindows-stack ()
|
||||
(let ((copy '()))
|
||||
|
Loading…
x
Reference in New Issue
Block a user