18

I recently switched to Ubuntu 22.04, and encountered this issue when switching workspaces:

I open a window (e.g. a text editor) on an a given workspace, and interact with the window (e.g. write “test”). Then I switch to another workspace, using the default keyboard shortcut. When I switch back to the original workspace and want to continue typing, the text editor window is somehow not active, and a “Find files on Desktop” pop-up window opens.

I observe this problem not only with text editors, but also terminals, browser, etc.

Any ideas how to avoid this?

Example screen recording

ingo-m
  • 301
  • 1
  • 7
  • I cannot reproduce this issue. Please correct your title to read Ubuntu 22.04 instead of Ubuntu 22. – vanadium May 08 '22 at 09:51
  • 3
    I have the same issue and it's really annoying... When switching workspace, focus is on the desktop instead of on the active window like it should. Examples: 1/ Nautilus open on one workspace and enter that workspace from another one, type Ctrl+L. The expected behavior is to get me to the search bar of Nautilus, but instead a small popup opens and offers to search files on the desktop. 2/ The same happens here on this forum with Firefox: focus is lost when switching workspace. Expected behavior is, when switching workspace, to keep focus where it last was. I am looking for a solution and will – Ben May 12 '22 at 07:51

2 Answers2

21

I ran into the same problem. I was able to get it working again on X11 by disabling the Desktop Icons NG extension by typing the following in a terminal:

gnome-extensions disable ding@rastersoft.com

nonameentername
  • 331
  • 2
  • 4
  • 6
    In my case this bug appeared after upgrade from 22.10 to 23.04 and disabling this extension helped. Thanks! – Lisio Apr 25 '23 at 22:18
  • It helped, thanks a lot! But disabling the desktop icons extension disabled desktop icons, who would know. I guess we are living icons free for now, haha. – Kirill Fedyanin Apr 27 '23 at 07:41
  • It’s probably a different root-cause than for the OP, but definitely my solution for 23.04 as well. A shame we cannot set tags on answers, too. – MPi Apr 28 '23 at 13:59
  • FINALLY!!! This has been driving me crazy for days now! Thanks for this pointer! :) – tftd May 05 '23 at 00:33
  • I have the same issue. Disabling this extension fixes the focus issue at the unfortunate cost of hiding my desktop icons. Running Ubuntu 23.04 upgraded from 22.10. – bmurphy1976 Jun 15 '23 at 14:03
2

The bug causing active windows to de-focus when switching workspaces has been described here:

Apparently this only happens when using Xorg. I was using Xorg; Wayland was disabled because of an issue with nvidia drivers described here: Can't use Wayland with Nvidia 510 drivers on Ubuntu 22.04 LTS

I was able to enable Wayland by setting WaylandEnable=true in /etc/gdm3/custom.conf, in combination with the hack described here: https://askubuntu.com/a/1403916/1593752

With Wayland enabled, the problem with windows losing focus is gone. But I do have serious graphics glitches now (flickering, windows briefly disappearing).

ingo-m
  • 301
  • 1
  • 7