Mouse Hover to Auto-Raise Window

By Xah Lee. Date: . Last updated: .

A great feature is window auto-raise. This way, you don't have to click the window to activate it, just hover mouse over it. This save you a lot clicks. However, it takes some time to get used to.


For Linux, you can set it in the Window Manager Preference. Exact steps depends on which desktop (gnome, kde, ubuntu unity, xfce, lxde, etc) you are using. 〔➤see Linux: How to Switch to LXDE, Xfce

linux openbox window manager raise window on focus
Linux LXDE OpenBox window manager obconf, raise window on focus.
linux xfce window manager raise window on focus
Linux Xfce Window Manager preference settings for auto-raise.

On Linux, be sure to make the delay time at least 0.5 second. Because, otherwise you'll often switch windows by mistake.

The Xfce preference setting doesn't indicate exact timing. But you can adjust it by editing the file ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml

<property name="focus_delay" type="int" value="500"/>
<property name="raise_delay" type="int" value="5"/>

Microsoft Windows

To turn mouse hover raise window on:

  1. go to “Control Panel”
  2. double click “Ease of Access Center”
  3. click “Make the mouse easier to use”
  4. checkbox “Activate a window by hovering over it with a mouse.”
  5. click Save.

What About Mac?

It's nearly impossible to set window auto-raise in OS X. See: 〔Settling the OS X focus-follows-mouse debate By Steve Yegge. @

Push Mouse to Window Edge to Switch Windows

You can set your apps so that each touches a edge on the screen. This way, you just nudge your mouse to switch. This is much faster and convenient than 【Alt+Tab ↹】.

xah Linux desktop 2013-06-02
Linux Xfce desktop

The most frequently used app for me are: Emacs, Firefox, Chrome, terminal. Each's window has a visible area on screen, usually on one edge of the screen. So i just hover to it to activate.

Also, you should set up a key to switch window within the same app. For example, in terminal, you might have several terminal windows. Once you push mouse to activate a terminal, you can press the key to switch to other terminal windows.

Don't Move Mouse Needlessly

One problem is that if you moved your mouse carelessly, some background window pops to the front. You can quickly go back to your previous window by【Alt+Tab ↹】. However, it is especially annoying when the window you are working on is a small dialog that just popped up while you are moving the mouse. You can't switch back to the dialog because it's not a window or app.

So, you'll get into the habit of not moving the mouse needlessly. Leave hand off the mouse when not actually moving pointer.

Auto-raise is especially good if you are a trackball or trackpad user. Because trackball are less likely to move the pointer unnecessarily. For best trackball, see Best Trackballs 2016.

Single Key to Switch App

Sometimes you have too many apps/windows open but you only have 4 screen edge. So, i recommend: One Key to Switch to {Firefox, Emacs, Terminal}.

If you use a full sized keyboard with numberpad, the numberpad keys is best used to switch apps, tabs, window. For detail and how-to, see How to set Number Keypad as Function Keys {Windows, Linux, Mac}.