** Description changed:
+ [ Impact ]
+
Focus follows mouse: Focus-mode "sloppy" seems to be broken in Ubuntu
26.04
```bash
gsettings get org.gnome.desktop.wm.preferences focus-mode
# "sloppy"
```
I have been using the "Focus on Hover" option without any problems on
Ubuntu 25.10 on my laptop, but after the update to Ubuntu 26.04 the
behaviour is broken, as the focus is always given to the window that the
mouse cursor is over, even when the mouse cursor does not move. This
prevents from switching windows via Alt+Tab:
* Two windows side-by-side
* Mouse cursor in the right window, working in the right window: works as
expected
* Press Alt+Tab: The focus switches to the left window (as expected), but
even when I don't move the mouse cursor, the focus jumps back to the right
window (where the mosue cursor is) within about half a second. This is
unexpected and makes this feature unusable, unfortunately.
The behaviour is more clearly visible if "Raise on Focus" is activated
and the windows overlap slightly. If needed I could submit a screen
recording of the behaviour.
A similar bug was reported and fixed in the past:
https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1969602
I am using Ubuntu 26.04, all packages are up to date at the time of
writing. The behaviour still appears when I disable all GNOME
extensions.
Related package versions:
```
libmutter-18-0/resolute,now 50.1-0ubuntu2 amd64 [installed,automatic]
mutter-common-bin/resolute,now 50.1-0ubuntu2 amd64 [installed,automatic]
mutter-common/resolute,now 50.1-0ubuntu2 all [installed,automatic]
```
- I really love this feature and I am so glad that GNOME Tweaks implements
- it. I hope that the behaviour can be fixed and returned to what it was
- before.
+ [ Test Plan ]
- Also, that the bug appears in `mutter` is just my suspicion. If I was
- wrong, please point me in the correct direction to re-submit the bug :)
+ 1. On a Wayland session, enable focus follows mouse:
+ gsettings set org.gnome.desktop.wm.preferences focus-mode 'sloppy'
+ 2. Open two windows, both visible (easiest with two monitors, one window on
each).
+ 3. Place the mouse pointer over window A and leave it there.
+ 4. Without moving the mouse, press Alt-Tab to switch to window B.
+ 5. Verify that window B has keyboard focus
+ 6. Verify that window B keeps window focus as long as the mouse is not moved
+ 7. Move the mouse within window A (over 50px, a threshold that exists to avoid
+ accidental focus switch)
+ 8. Verify that the keyboard focus is switched back to window A
- ```bash
- lsb_release -rd
- # Description: Ubuntu 26.04 LTS
- # Release: 26.04
+ [ Where problems could occur ]
- apt-cache policy mutter-common
- # mutter-common:
- # Installed: 50.1-0ubuntu2
- # Candidate: 50.1-0ubuntu2
- # Version table:
- # *** 50.1-0ubuntu2 500
- # 500 http://at.archive.ubuntu.com/ubuntu resolute/main amd64 Packages
- # 100 /var/lib/dpkg/status
- ```
+ The change is confined to sloppy/mouse focus-mode handling in
+ src/core/display.c and src/core/window.c (tracking the window under the
+ pointer and only letting it take focus on real pointer motion). Users of the
+ default 'click' focus mode are unaffected. A regression would most likely
+ show up as incorrect focus behaviour for focus-follows-mouse users, e.g.
+ hover focus not triggering after keyboard switching.
** Changed in: mutter (Ubuntu Resolute)
Status: Triaged => In Progress
** Changed in: mutter (Ubuntu Resolute)
Assignee: (unassigned) => Alessandro Astone (aleasto)
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2152847
Title:
Focus follows mouse: Focus-mode "sloppy" seems to be broken in Ubuntu
26.04
To manage notifications about this bug go to:
https://bugs.launchpad.net/mutter/+bug/2152847/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs