Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

My problem is actually very annoying. I am very familiar with the mouse focus but right now it's not working.

Inside gnome-tweak-tool the last option "windows" has the "windows focus mode" switch. I've set it to "mouse" but it does not work. It acts just like the "sloppy" option. I hope another gnome user understands my issue.

enter image description here

UPDATE:

enter image description here

share|improve this question
    
Is this happening on a regular gnome-session or under fallback mode ? Are you using gnome-shell as it comes from upstream, i.e. you are unable to right-click on desktop or to place icons on your desktop ? –  don_crissti Sep 29 '12 at 3:17
    
just a regular session... nothing else is wrong with it. –  maniat1k Sep 29 '12 at 23:08

1 Answer 1

up vote 5 down vote accepted
+50

In a standard gnome-shell setup, mouse focus and sloppy focus behave identically. The reason is simple: there is no DESKTOP. The mouse focus method, particularly, needs a DESKTOP in order to work properly but there is no such thing in gnome-shell, in its standard incarnation. Unfortunately, this is only documented in mutter docs. dconf-editor still has the old key/values description from Gnome2 metacity times and gnome-tweak-tool doesn't even provide a description let alone toggle the DESKTOP on once you switch to mouse focus.
Here is an excerpt from mutter-3.**/doc/how-to-get-focus-right.txt:

Focus method  Behavior
    click     When a user clicks on a window, focus it
   sloppy     When an EnterNotify is received, focus the window
    mouse     Same as sloppy, but also defocus when mouse enters DESKTOP window

Note that these choices (along with the choice that clicking on a window raises it for the click focus method) introduces the following invariants for focus from mouse activity:

Focus method  Invariant
    click     The window on top is focused
   sloppy     If the mouse is in a window, then it is focused; if the mouse is not in a window, then the most recently used window is focused.
    mouse     If the mouse is in a non-DESKTOP window, then it is focused; otherwise, the designated "no_focus_window" is focused

However, there are a number of cases where the current focus window becomes invalid and another should be chosen.  Some examples are when a focused window is closed or minimized, or when the user changes workspaces.  In these cases, there needs to be a rule consistent with the above about the new window to choose.

Focus method  Behavior
    click     Focus the window on top
   sloppy     Focus the window containing the pointer if there is such a window, otherwise focus the most recently used window.
    mouse     Focus the non-DESKTOP window containing the pointer if there is one, otherwise focus the designated "no_focus_window".

Now, back to your problem. You have to "enable" the DESKTOP in order to have mouse focus working properly. This can be done:

  • using gnome-tweak-tool > Desktop > Have file manager handle the desktop > ON
  • using dconf-editor >> org.gnome.desktop.background >> show-desktop-icons > checked
  • in terminal, running: gsettings set org.gnome.desktop.background show-desktop-icons true

Restart gnome-shell after applying all your settings.

share|improve this answer
    
I understood the explanation, but it did not work the solution that you are giving me. A friend of mine do have all this setted and options works as they should. We have the same verion of gnome and the same distro's version. –  maniat1k Sep 30 '12 at 20:15
    
after a little test found my problem -org.gnome.desktop.wm.preferences auto-raise true swithced to -org.gnome.desktop.wm.preferences auto-raise false thanks again @don_crissti –  maniat1k Oct 1 '12 at 18:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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