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?

3 Likes

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.