Bring back "Make window ordering rely on frame position"

Fixes #136
Fixes #135
old-master
Oleh Krehel 8 years ago
parent 8d71b8f97d
commit 92d20e7e75
  1. 10
      ace-window.el

@ -557,6 +557,11 @@ window."
(t (ace-select-window)))) (t (ace-select-window))))
;;* Utility ;;* Utility
(unless (fboundp 'frame-position)
(defun frame-position (&optional frame)
(cons (frame-parameter frame 'left)
(frame-parameter frame 'top))))
(defun aw-window< (wnd1 wnd2) (defun aw-window< (wnd1 wnd2)
"Return true if WND1 is less than WND2. "Return true if WND1 is less than WND2.
This is determined by their respective window coordinates. This is determined by their respective window coordinates.
@ -565,8 +570,9 @@ Windows are numbered top down, left to right."
(f2 (window-frame wnd2)) (f2 (window-frame wnd2))
(e1 (window-edges wnd1)) (e1 (window-edges wnd1))
(e2 (window-edges wnd2))) (e2 (window-edges wnd2)))
(cond ((string< (frame-parameter f1 'window-id) (cond ((< (car (frame-position f1)) (car (frame-position f2)))
(frame-parameter f2 'window-id)) (not aw-reverse-frame-list))
((> (car (frame-position f1)) (car (frame-position f2)))
aw-reverse-frame-list) aw-reverse-frame-list)
((< (car e1) (car e2)) ((< (car e1) (car e2))
t) t)

Loading…
Cancel
Save