Bspwm: Jetbrains (Intellij etc) IDEs Not Refocusing

Created on 5 Sep 2018  路  8Comments  路  Source: baskerville/bspwm

In the latest versions of the Jetbrains IDEs such as Intellij IDEA (starting at 2018.2), if the window is unfocused and then refocused, the window is not actually refocused and the cursor disappears. This happens both when switching away to another desktop and then back, and also when switching to an adjacent window on the same desktop and then back.

When switching between an IDE window and an adjacent terminal, when moving focus back to the IDE, the window border surrounds the IDE but I can still type in the terminal. Pretty weird.

This is reproducible with intellij-idea-community-edition in the official Arch repos.

I've made a short video to demonstrate: https://youtu.be/Qh68yzVydS4

Here are some potentially relevant other discussions on similar problems, but I'm not sure if they're relevant at all since they seem to be mostly resolved and were reported earlier than 2018.2.

https://youtrack.jetbrains.com/issue/IDEA-188824
https://youtrack.jetbrains.com/issue/IDEA-186154
https://youtrack.jetbrains.com/issue/IDEA-186066#comment=27-2792691

Thanks so much for your help.

Most helpful comment

@alexozer I just looked it up and it's a lot more arcane than I remember. Go to Help -> Edit Custom Properties in the menu bar, and set the property suppress.focus.stealing=false

All 8 comments

I fixed this by disabling 'Focus Stealing Prevention' inside IntelliJ, but it'd be nice to have a WM-level fix.

@half-cambodian-hacker-man I can't seem to find a "focus stealing prevention" setting in Intellij, how did you go about doing it?

@alexozer I just looked it up and it's a lot more arcane than I remember. Go to Help -> Edit Custom Properties in the menu bar, and set the property suppress.focus.stealing=false

@half-cambodian-hacker-man Thank you, this works great.

Also I managed to reproduce this in i3, so closing for now as is likely irrelevant to bspwm.

@alexozer I just looked it up and it's a lot more arcane than I remember. Go to Help -> Edit Custom Properties in the menu bar, and set the property suppress.focus.stealing=false

Thank you! It completely worked for me! :) You freed me from months of frustration.

@alexozer I just looked it up and it's a lot more arcane than I remember. Go to Help -> Edit Custom Properties in the menu bar, and set the property suppress.focus.stealing=false

After a restart of the program this solution fixed my issue also. Thanks!

@alexozer I just looked it up and it's a lot more arcane than I remember. Go to Help -> Edit Custom Properties in the menu bar, and set the property suppress.focus.stealing=false

If the problem returns after updating the JetBrains IDE to version 2020.x, try setting an additional custom setting (in addition to the one half-cambodian-hacker-man mentioned):

suppress.focus.stealing=false
suppress.focus.stealing.disable.auto.request.focus=false

Further references can be found here and here.

Thank you @sodic, I was going insane pressing CTRL+F and then ESC to get my focus back

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alecive picture alecive  路  7Comments

notmgsk picture notmgsk  路  6Comments

fluffywaffles picture fluffywaffles  路  5Comments

Th3Whit3Wolf picture Th3Whit3Wolf  路  4Comments

Fnux picture Fnux  路  4Comments