1
0
Fork 0

- added a parameter to discard windows when calculating the non intersecting ones.

This commit is contained in:
cage 2022-03-11 10:59:23 +01:00
parent a2c92e45bb
commit 8eafdb4201
2 changed files with 7 additions and 6 deletions

View File

@ -623,7 +623,11 @@ along the focused window."
(defun pass-focus-next () (defun pass-focus-next ()
"Move focus to next window in left to right writing order." "Move focus to next window in left to right writing order."
(if (not (window-focused-pinned-p)) (if (not (window-focused-pinned-p))
(let* ((visible-sorted-window (windows:remove-intersecting-window)) (let* ((discarded-window-type '(main-window::main-window
command-window:command-window
notify-window:notify-window))
(visible-sorted-window (windows:remove-intersecting-window :discarded-window-type
discarded-window-type))
(focused-window (main-window:focused-window *main-window*)) (focused-window (main-window:focused-window *main-window*))
(focused-position (position focused-window visible-sorted-window)) (focused-position (position focused-window visible-sorted-window))
(next-window-position (rem (1+ focused-position) (length visible-sorted-window))) (next-window-position (rem (1+ focused-position) (length visible-sorted-window)))

View File

@ -342,12 +342,9 @@ height, position and so on)"
(h (win-height object))) (h (win-height object)))
(2d-utils:make-iaabb2 x y (1- (+ x w)) (1- (+ y h))))) (2d-utils:make-iaabb2 x y (1- (+ x w)) (1- (+ y h)))))
(defun remove-intersecting-window () (defun remove-intersecting-window (&key (discarded-window-type '()))
(labels ((copy-subwindows-stack () (labels ((copy-subwindows-stack ()
(let ((copy '()) (let ((copy '()))
(discarded-window-type '(main-window::main-window
command-window:command-window
notify-window:notify-window)))
(do-stack-element (w *window-stack*) (do-stack-element (w *window-stack*)
(when (and (win-visible-p w) (when (and (win-visible-p w)
(not (find-if (lambda (a) (typep w a)) (not (find-if (lambda (a) (typep w a))