Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jetbrains (Intellij etc) IDEs Not Refocusing #841

Closed
alexozer opened this issue Sep 4, 2018 · 8 comments
Closed

Jetbrains (Intellij etc) IDEs Not Refocusing #841

alexozer opened this issue Sep 4, 2018 · 8 comments

Comments

@alexozer
Copy link

alexozer commented Sep 4, 2018

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.

@char
Copy link

char commented Sep 9, 2018

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

@alexozer
Copy link
Author

alexozer commented Sep 9, 2018

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

@char
Copy link

char commented Sep 9, 2018

@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

@alexozer
Copy link
Author

alexozer commented Sep 9, 2018

@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 alexozer closed this as completed Sep 9, 2018
@Vrakfall
Copy link
Contributor

Vrakfall commented Dec 6, 2018

@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.

@jord-bh
Copy link

jord-bh commented Dec 13, 2018

@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!

@sodic
Copy link

sodic commented Apr 24, 2020

@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.

@MatthiasKunnen
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants