6

I've been a fan of the Window Focus mode called "Secondary-Click" (previously "sloppy focus") - available via Gnome Tweaks under the "Windows" tab - which used to work as follows:

  1. Take two windows, A and B.
  2. A has focus and mouse pointer over it.
  3. Alt-Tab to switch focus to B
  4. Focus is now on B and remains on B despite mouse still being over A
  5. Moving the mouse over a different window causes focus to shift.

What's now happening is that in step 4, the focus switches to B, but then a fraction of a second later, it switches back to A (where the mouse is), even without the mouse being moved.

The reason I like the old behaviour is that:

  • I can navigate windows with the keyboard only. e.g. "start a new email" might mean Alt-tab to Thunderbird and hit Ctrl+N.
  • I can focus a non-foreground window with the mouse. This is super useful, especially when doing multiple copy-and-paste type operations.

I believe it might be Wayland that made the difference. (Unfortunately I can no longer use Xorg/X11 because of bugs in the Intel software that cause system hangs.)

I'm using (have always used) Gnome Shell, not Unity.

It might be the case that Wayland interprets what it's supposed to do differently, and that is final, but posting here in case anyone else misses the old behaviour and has found a workaround?

To save people asking:

  • yes this is similar to a question about 12.04 but that is (a) about 12.04 and (b) about a bug in unity and (c) the workaround mentioned therein does not apply/work.

  • this is similar to a question from 2020 but that seemed to be a faulty touchpad issue.

  • this is not the same as my question from 2019 where Gnome settings removed access to the sloppy focus mode, which has since been exposed by Gnome Tweaks.

artfulrobot
  • 8,543
  • 2
    Hello. 22.04 does not exist. It is scheduled to be released on the 21 st of April. Till it is any question is off topic when it is about a beta product. After it is released run update and upgrade. If you still have the issue post a question. – David Apr 19 '22 at 07:53
  • 1
    @David ha ha, ok, I appreciate that that's technically true. Let's wait 2 days for when it's on topic, then, I will of course update this question with an answer if it is magically fixed by an update. – artfulrobot Apr 19 '22 at 12:30
  • Do not forget update and upgrade and me I would re boot as well after. – David Apr 19 '22 at 12:31
  • 2
    Hey, 22.04 exists. And so does this question :-) – artfulrobot Apr 21 '22 at 14:33
  • I'm experiencing this too after switching to Wayland, on Arch nonetheless. I don't think this is an Ubuntu-specific bug, but Gnome on Wayland. – Serenical Apr 30 '22 at 10:14
  • 1
    https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5439 – artfulrobot May 05 '22 at 15:18

1 Answers1

3

You can fix this in a hackish way by installing the following gnome shell extension which moves the mouse to the centre of the selected window after alt-tab.

https://extensions.gnome.org/extension/4673/alt-tab-move-mouse/

Credit to author of the amazing AATWS extension who pointed this out to me.

artfulrobot
  • 8,543
  • 1
    +1 this works (as a work-around). though, note that currently firefox doesn't support gnome-extensions (because now it's a snap), so perhaps it could be installed via chrome; but I instead installed it manually & it's working – michael Sep 13 '22 at 09:54
  • Thanks for reporting. Of course whether ffox gnome integration works is a separate issue that depends on how you install firefox. Yours doesn't work. Mine does (as I don't use the snap, you know, because I like software to load fast and work properly ;-)). – artfulrobot Sep 13 '22 at 10:06
  • totally agree, firefox issue is unrelated except for installation, but just wanted to warn users, as it'll be an issue for many. (Aside: super annoying how firefox was broke by snap. Nearly all firefox extensions now broken due to sandboxing. One can try to stick w/ the ffox deb pkg, but that comes w/ its own set of issues, being discontinued & all (it's a lost cause). Chrome is probably an option for gnome-shell-extensions, I think? If I were starting over, I'd probably try Chrome instead, which now I gotta use for most browser extensions, anyway.) – michael Sep 13 '22 at 10:47
  • I know we're off topic, but scheesh! ditching Firefox for Chrome because of packaging - that's awful. (Chrome has so much tracking built in. Chromium slightly less so, I believe.) – artfulrobot Sep 14 '22 at 09:40