From c35618ed00b57b4072697d49070e9ade7771fc37 Mon Sep 17 00:00:00 2001 From: Connor Nelson Date: Fri, 1 Jun 2018 09:50:43 -0700 Subject: [PATCH] Make window ordering rely on frame position I'm not quite sure what exactly the intention was of doing this off the id comparisons of the frames (they don't seem to be very consistent?). I think that going off frame positions is much more intuitive. This only considers horizontal frame position, but it might also be worth considering their vertical position. --- ace-window.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ace-window.el b/ace-window.el index 1e3d0b1..237a3ff 100644 --- a/ace-window.el +++ b/ace-window.el @@ -537,8 +537,9 @@ Windows are numbered top down, left to right." (f2 (window-frame wnd2)) (e1 (window-edges wnd1)) (e2 (window-edges wnd2))) - (cond ((string< (frame-parameter f1 'window-id) - (frame-parameter f2 'window-id)) + (cond ((< (car (frame-position f1)) (car (frame-position f2))) + (not aw-reverse-frame-list)) + ((> (car (frame-position f1)) (car (frame-position f2))) aw-reverse-frame-list) ((< (car e1) (car e2)) t)