I use Linux, specifically Mint 13 with cinnamon. However, I'll be happy with answers that apply to a more recent version of Mint, or a current version of Ubuntu or one of its offshoots.

I often have a number of applications running. I can scroll a window by moving my mouse cursor over top of it and using my scroll wheel. However, this does not change focus to that window. Is there a way to force this to happen? That is, I would rather not have to click on the window, I expect just by scrolling, the window should gain focus.

  • I don't want focus-follows-mouse, I want click-to-focus but also, gain-focus-on-scroll-wheel. – ChrisInEdmonton Apr 5 '13 at 17:17
  • Perhaps you mean "selecting a window by iteration" when the mouse is scrolled? As in alt-tab, but for the mouse wheel? Please clarify your question. For starters, name specific programs and windows. Your window manager (or desktop environment) is also relevant here. terdon suggests the same thing as I, and he is very good at interpreting questions... --- With Fluxbox, the commands NextWindow and PrevWindow can be bound to any key or mouse button, with or without shift, alt, control, win-key. I suspect Gnome/Cinnamon can do this also. If not, there are ways around that. – Ярослав Рахматуллин Apr 5 '13 at 18:33
  • Sorry, I'm not sure how to reword this. Could you help me? I'm not deliberately being unclear. I want focus to behave exactly as it does with click-to-focus EXCEPT if I move my mouse over top of a window and use the scroll-wheel to scroll that window, then the focus should move to that window. With a standard two-button mouse + scroll, I understand the up and down are 'button 4' and 'button 5'. I want buttons 4 and 5 to transfer focus (as button 1 and 2 would) and also scroll the window as they currently do. – ChrisInEdmonton Apr 5 '13 at 18:47
  • 2
    Xfce has this feature by default. – jbrock Oct 16 '17 at 15:12

In X windows in general (and all DEs that I've ever used), you can change the focus settings so that the window under the mouse is automatically focused. Specifically for Cinnamon, do:

  1. Open the Cinnamon settings application and click on Windows

    enter image description here

  2. Set the focus to Mouse

    enter image description here

As far as I know, there is no way of giving the focus to a window by scrolling, but I think you'll find this works just as well. "Focus follows mouse" was one of the main reasons I was convinced to use Linux with my first Mandrake KDE back in 1998 :).

| improve this answer | |
  • I don't actually want focus-follows-mouse. I only want the focus to change if I scroll in another window, but I still want to be able to move my mouse out of the window without losing focus. Your answer is good and the screenshots are nice, but doesn't quite solve my (perhaps overly specific) issue. Given your suspicion that there's no perfect solution, I may have to try this for a few days. – ChrisInEdmonton Apr 5 '13 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.