I have been using Ubuntu (with Gnome) for like almost 20 years and I know one of the best features in Linux desktop is to prevent applications to steal focus. One of the things I hate about Windows the most.
For example I am in text editor typing something. Then I think I would like to have LibreOffice Calc to do some calculation. From dock I click on LbireOffice Calc icon and click back inside my opened text editor window and continue typing. On my older laptop launching application just takes like two to three seconds. It used to work like this, LibreOffice Calc was opened in background and system notification was displayed âWindow is Readyâ.
But know when LibreOffice Calc is ready it is suddenly just displayed over my existing text edtior. Stealing window focus. I hate this.
I donât know if this is some specific to Blufin 40 (from stable channel), because I know this was not working like this on Ubuntu or was there some recent Gnome update or somethingâŚ
This was just one of the best features in Linux desktop I hope I will not lose this.
What I hate the most in Windows is, when I am typing something in text editor and I want to press Enter to get into next line and then at the same moment some application steals focus and displays some Yes/No dialog and pressing Enter and âYesâ button is applied. Bad bad bad designâŚ
I see on Windows (but have not seen it on Linux desktop) some of the applications do not steal focus but instead taskbar icon is blinked few times indicating some attention is required on that window - this is way better design.
Do you think this is Blufin 40 specifics or there was some Gnome update or some setting has changed?
@j0rge, your suggested extension does exactly opposite what I want.
Extension: prevent notification âApplication is readyâ and launched application steal window focus.
I want: display notification and launched application do NOT steal window focus.
I have now fresh installed Ubuntu 24.4.1 LTS and Ubuntu 24.10 to test. What I see by default both behaves like Blufin. New launched application steals focus.
On the following systems I retried gnome-shell version with gnome-shell --version
Blufin 40 from stable channel â uses gnome-shell 46.5
Ubuntu 24.4.1 LTS â uses gnome-shell 46.0
Ubuntu 24.10 â uses gnome-shell 47.0
and then performed bellow tests.
Start Text Editor and make sure you maximize the editor.
Start typing.
Click on LibreOffice Calc (I have pinned the app to dock) from dock.
Immediately click back to maximized text editor and continue typing.
In all three systems LibreOffice Calc after few seconds when it is started up steals window focus. Exactly what I donât want.
Now get the focus settings: gsettings get org.gnome.desktop.wm.preferences focus-new-windows
Above command displays âsmartâ which is somehow some mixed solution for focus stealing.
Change setting to âstrictâ: gsettings set org.gnome.desktop.wm.preferences focus-new-windows 'strict'
Repeat steps from 1 to 4 (including). Result: Both Ubuntus do not steal focus but Blufin does steal focus.
Now I am baffling:
Did I also change some other setting on my Blufin that I donât remember and has effect to windows focus?
Did I do something differently on Ubuntus then Blufin?
Is this effect of different Gnome shell versions?
Is this effect of some setting in Blufin (set in project itself)?
Something else I currently (or maybe never) canât see?
Can someone else do above test in Blufin 40 to confirm the issue?
EDIT: Additional test in Blufin in Extension Manager at the top first setting I have disabled all of extensions and the problem remains. At least not extension issue.
Yeah I know I just wanted to doublecheck that there wasnât an extension installed because the behavior you describe doesnât sound like the fefault behavior.
Now I double checked and I see in Ubuntus I have set âExtendedâ when installing operating system (Default is Minimal). In this case LibreOffice is install using standard deb package.
Super key and type in âlibreoffice calâ and right click and Pin to Dash.
Now do the test (steps 1 to 4).
The same behaviour:
click from dash or
flatpak run org.libreoffice.LibreOffice --calc
In Ubuntu focus is still not stolen in flatpak version and gsettings set to âstrictâ, just like I want.
Still a mystery⌠Donât know what is the issue⌠maybe some gnome-shell 46.5 change that was reverted back in 47.0, just wild guessing. Will see what will happen when Blufin 41 is relased with gnome-shell 47.0 I assume.
@Plyply, I have checked and auto-raise was already set to false.
I have also tested all of the options in Gnome Tweaks tools from Windows Focus options (your print screen). Nothing fixes the issue I have described.
âAlways on topâ requires Text Editor to not be maximized, but I like it maximized. Also when I do want to use LibreOffice Calc I canât switch to it, because Text Editor is always on top. Movign and resizing window is also time consuming⌠and more annoying then stole window focus.
Just wondering, did someone test this behaviour? My steps above⌠and can confirm the issue on your system?
I have Gnome set up like a tiled window manager so canât really test for you.
The Gnome article you linked to earlier does talk about Gnomeâs behavior being problematic sometimes. Especially how, depending if the app implements focus behavior properly.
Personally I love Gnome but they do tend to overthink things. They should give an option to prevent focus stealing completely.