Window Focus Issue in Gnome?

Sorry for my poor English

Hi everyone, a linux noob here. I meet something weird with the windows focus in gnome desktop after I upgraded my system last week. Here’s what I do to trigger the “bug”:

  1. Reboot and enter the gnome desktop;
  2. Open gnome terminal (let’s call it app1, the windows focus should be on it now);
  3. Open chromium(let’s call it app2, the windows focus should be switched to chromium now);
  4. Enter the “Activities Overview” in gnome (move mouse to top left corner of the screen);
  5. Click the gnome terminal window to get back to the main desktop.

Now I get back to the desktop, but neither gnome terminal nor chromium get the window focus. And I can’t set focus on gnome terminal no matter how many times I click on it.

I have tried several app. In my case, app1 could be thunar, terminator. app2 could be chromium, firefox, vscode.

I have tried xfce, everything works just fine in it.

I have tried removing and reinstalling gnome-desktop and gnome-shell, disabling all the gnome extensions I installed, but I still get this “bug”.

I’m not sure where to ask for support because I don’t know why this “bug” happens, so I came here.

Any suggestion on how I can solve this bug or where to find solutions?

1 Like

Is your system updated?

I don’t think, that it is bug. Maybe have a look gnome tweaks?

On a Live Session in a VM, there is no issue.

Thanks for replying!

Yes, it is. I actually encounter this problem right after sudo pacman -Syu

My Window Focus setting in gnome-tweaks is all the same as yours.

I know that “Click to Focus” means when I click any window on the desktop, it should be focused (and the window should be able to react to select, typing…). But after I enter the Activities Overview and click on terminal, it can’t get focused (just as you can see in the pics below).

  1. this is terminal getting focus as usual:
    https://paste.pics/LUFJ3

  2. this is what happens after I trigger the bug:
    https://paste.pics/LUFM1

In the 2nd screenshot I only open three windows, none of them get focused, and the terminal isn’t responding when I type.
And I can’t get it focused by clicking on it now.
I can only click on chromium, and then click on terminal to get terminal focused now.

Everything works fine if I don’t open chromium or firefox or vscode.

Looks like you use a customized theme. It could be perfectly a misbehavior of some tweaks of it. Vanilla Gnome or Manjaro’s Gnome doesn’t have that problem. In the past there were problems as Gnome gets updated and the custom theme/tweaks lead to misbehavior, just saying.

Maybe create a new user, login there and test if it is the same problem.

Tried login with a newly created user and reinstall gnome-desktop gnome-shell, the problem still exists.

Is there any way to find out what’s causing this problem without reinstalling my system?

Or maybe I should reinstall my system to solve this problem :melting_face:

Debugging. At least what you can do is removing every extension step by step. Remove every customization, step by step. Make Gnome vanilla again. Try Xorg and Wayland mode.

I think I’m having the same experience. I haven’t been sure how to describe it but this seems pretty much the same to me. In my case I’m using Gnome without any themes, Wayland, and the only extension I have is the app indicator. I’m on the testing branch, fully up-to-date. The behaviour seems the same to me except I’m using Firefox, Files (Nautilus), and some other applications.

I’m not 100% sure yet but it seems like this happens primarily when I switch to an Electron application and then back to something else. I could be wrong about that because I haven’t tested enough to isolate it for sure.

Could be Mutter Problem (cant post a Link lol) , but since its merged in Gnome 44 i would try to downgrade maybe (just my Idea after being affected and googling 5 minutes)

1 Like

Having the same issue actually.

I have not been able to isolate it, but it seems to “only affect certain applications” (telegram & chrome in my case). Vs-code and slack are always focusable.

Gnome Wayland has this problem;
Gnome on Xorg doesn’t have this problem.

I’ve tested this in a new user with extensions disabled and no customization made, I think this is the most vanilla gnome I can get now.

You mean
https://gitlab.gnome.org/GNOME/mutter/-/issues/2635 ?

But my situation is a little bit different from that:

Alt+Tab doesn’t cause problem.
Everything in gnome on xorg works fine.

I’m in manjaro stable branch using gnome 43.3 now, by the way.

I’m still trying to downgrade, but the dependencies are killing me (can’t start gdm after downgrading gnome).

pretty sure I have the same problem. it is really annoying. At first I thought it has something to do with firefox, but my terminal had the same issue.

After some time I am unable to click or enter by keyboard. It is hard to describe, it feels like the window is not taking focus, but that is not completely the case. I think that some programs are still responding like they should be, and I think those are programs that are still not running 100% with Wayland. I will test it a bit more the following days and report back. I am also on the testing branch, and I dont have the issue on another computer that is on stable.

its an upstream issue, you just have to google “gnome wayland windows focus bug” and it should throw up this https://www.reddit.com/r/archlinux/comments/113fuz6/gnome_433_focusselectwindow_bug/ and this https://www.reddit.com/r/gnome/comments/115j5l8/wayland_window_focus_bug_after_updating_to_433/

3 Likes

Thanks, apparently it was already fixed and will most probably be included in the next gnome update manjaro will ship. As a workaround I found out that opening an xterm window made the issue go away in all other windows.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.