Ubuntu – How to prevent new windows from stealing focus

18.04focusgnome-shell

Typical situation is that I type something (worst case is my password) in some application, when some other application pops up a window and steals the focus, so my typing (password) goes to something else. I would like to prevent this, at least when I actively type something in an edit box. I always really hated this on Windows, but I never found a way to prevent this. I started using Ubuntu a while ago, and so far I was able to do everything I wanted, so I thought maybe this is also possible. Thanks in advance!

Best Answer

The best recommendation I have for this issue is using "Always On Top" or "Always Below Other Windows" options for the window you need to remain (un)focused. Just right-click your title bar and check the option. I can promise, that window anyhow, will and/or will not lose focus for anything popping up.

You can also force certain windows to stay on a particular workspace. You could also divert the applications that have frequent notifications to workspace 1 and then operate from workspace 2.