Stop Gnome notifications from stealing focus

Many Gnome notifications, like “Battery is low” or even Firefox notifications steal window focus.

You’re happily typing, a notification pops up and my typing ends up not being registered. It is annoying.

I read about setting org.gnome.desktop.wm.preferences.smartfocus to strict, but it seems this has other negative effects, like Libreoffice documents opened from Files not getting focus.

Is there a way to stop notifications getting focus unless one clicks on them?


From the notification bar you can mute all.

I know that, but notifications are useful so I would rather not disable them outright.

The notification is to alert the user to the current situation. If it does not overlay the current window then it would not be seen at all when a window is full screen.

If you wait a few seconds almost all the notifications time out and disappear. While somewhat disruptive to the normal flow, that is their purpose. If you want them to stop disable them. If you want them to show then train yourself to deal with the (hopefully few) interruptions. If you are getting a lot of notifications then find and fix the cause.

Focus stealing is a tough problem across many Linux and non-Linux desktop environments. Not as much of an issue for those who watch the screen as they type and have quick reflexes. For those who are fast on the keyboard and have fingers in motion when a popup pops, this is a common annoyance. No good solutions, to my knowledge.

I’m confused, because notifications do not take window focus. They only appear at the top of the stack so they are on top of everything, but I can continue to type in whatever window I’m using without it changing focus.

1 Like

That depends on whether you use Wayland or Xorg I suppose. On Wayland I don’t have this problem, all notifications and other pop-ups work logically (without stealing window focus and then never returning it to the window I were working with).

Not a reply to you, but to another statement made in the discussion: I also want to note, that the idea that notifications should work this way, in my opinion, is very, very bad and disruptive and then I would rather not have notifications at all. As for me, it is enough that the notification slides from the top part of the screen and does not dsirupt anything. I still notice them. I think, this should be customizable.