Lose Focus after Switching Workspace in i3wm

Completed

Platform: PyCharm 2018.2.1, i3wm 4.11, Ubuntu Server 16.04.

 

Step 1: editing in the editor of PyCharm, in workspace No. 3;

Step 2: switch to another workspace, say, No. 1;

Step 3: switch back the workspace No. 3;

Step 4: the editor of PyCharm responds to Enter, Backspace, F3, F9 keys, but no response to the keys a-z, 0-9.

 

I've tried Switch Boot JDK, and add `for_window [class="^jetbrains-.+"][window_type=dialog] focus` or `focus_follows_mouse no` in i3 config. But none works.

 

How to fix it? Thanks.

6
14 comments
Avatar
Permanently deleted user

Hi Sergey,

Adding suppress.focus.stealing=false in custom properties fixes this issue.

Thanks!

4

@Sergey, you've fixed an issue that has been bugging me for literally years. Thank you so much :)

0

OMW @Sergey - I was considering moving away from i3.. just when I was really enjoying it - Thank you!!! <3

0
Avatar
Marcus Agnusdei

@Sergey, omg so much pain saved, thank you.

0

I'm using Sway and adding the `suppress.focus.stealing=false` custom property does not seem to work for me. Is anyone else having this issue?

0

Yes, I do have the problem. With each of the JetBrains IDEs. It's very annoying. 

 

I activated `suppress.focus.stealing=false`. It seemed to work in the beginning. However, it does not anymore. My focus constantly gets lost. Not even on switching workspaces, but also when for example a browser on the second screen reloads the page, I just edited. So in the end, for each edit in code editor, I lose focus, because the browser refreshes itself....

 

Edit: I figured out, that the problem is somewhat more complex. I have two webstorm instances on one tag in a tabbed layout. After switching workspaces (or other event, like browser refresh), the focus is on the left-tab IDE (even though, the other one might be visible). Thus, the suppress-focus-stealing only works on the IDE on the left. 

 

Will cross-post this in i3 bugtracker

 

 

This is ONLY reproducible with JetBrains products....

1

I've been having the same problem with IntelliJ, even with `suppress.focus.stealing=false`.

This config worked for a long time, but recently it stopped to work.

And in my case, I have only one instance opened. It loses focus when I change workspace but also the editor loses focus even when I use multimedia keys on my keyboard (volume up/down, play/stop) without changing workspace.

 

I remember a recent update:

IntelliJ IDEA 2019.3.4 (Ultimate Edition)
Build #IU-193.6911.18, built on March 17, 2020
Runtime version: 11.0.6+10 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Linux 5.5.11-arch1-1
GC: ParNew, ConcurrentMarkSweep
Memory: 1898M
Cores: 8
Registry: debugger.watches.in.variables=false
Non-Bundled Plugins: IdeaVIM, Lombook Plugin, Pythonid, org.jetbrains.kotlin, org.jetbrains.plugins.go

1
2

I can confirm reloading i3 works for me. Thanks Gunnar.

PS> I also have the "supress" setting above in my custom options, it didn't work.

 

 

0

Thank you Gunnar. I also had the problem again with i3 and and PyCharm 2020.1

The `suppress.focus.stealing=false` was working with previous PyCharm versions but not anymore with the new one. This was a real pain.

Reloading i3 solve this.

Edit: It turns out that you can also add this in your configuration

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

With this you don"t need to reload i3 after launching PyCharm

 

1

I have tried all above and it doesn't work. This continuous focus losing is the most annoying behavior ever! It doesn't allow me to make progress. 

 

Number 1 productivity killer :(

 

 

 

0

Wow, amazing to finally find a fix for this.

suppress.focus.stealing=false

in idea.properties worked for me as well.

0

Please sign in to leave a comment.