auto-raise-mode
auto-raise-mode is an interactive compiled Lisp function in `frame.el
'.
(auto-raise-mode &optional ARG)
Toggle whether or not selected frames should auto-raise.
With a prefix argument ARG, enable Auto Raise mode if ARG is
positive, and disable it otherwise. If called from Lisp, enable
the mode if ARG is omitted or nil.
Auto Raise mode does nothing under most window managers, which
switch focus on mouse clicks. It only has an effect if your
window manager switches focus on mouse movement (in which case
you should also change `focus-follows-mouse' to t). Then,
enabling Auto Raise mode causes any graphical Emacs frame which
acquires focus to be automatically raised.
Note that this minor mode controls Emacs's own auto-raise
feature. Window managers that switch focus on mouse movement
often have their own auto-raise feature.