Skip to content

Commit c6b5f9f

Browse files
committed
fix: should select parent frame in child frames
1 parent ef28840 commit c6b5f9f

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

doom-modeline-core.el

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ used as an advice to window creation functions."
12191219
;; Keep `doom-modeline-current-window' up-to-date
12201220
(defun doom-modeline--selected-window ()
12211221
"Get the selected window."
1222-
(frame-selected-window))
1222+
(frame-selected-window (frame-parent)))
12231223

12241224
(defvar doom-modeline-current-window (doom-modeline--selected-window)
12251225
"Current window.")
@@ -1256,12 +1256,7 @@ used as an advice to window creation functions."
12561256
(defun doom-modeline-focus-change (&rest _)
12571257
"Focus change."
12581258
(if (frame-focus-state (frame-parent))
1259-
(progn
1260-
(doom-modeline-set-selected-window)
1261-
;; HACK: pulse after focusing in the frame to refresh the buffer name.
1262-
;; @see https://github.com/seagle0128/doom-modeline/issues/591
1263-
(when (fboundp 'pulse-momentary-highlight-region)
1264-
(pulse-momentary-highlight-region 0 0)))
1259+
(doom-modeline-set-selected-window)
12651260
(doom-modeline-unset-selected-window)))
12661261

12671262

0 commit comments

Comments
 (0)