Can't type on CLion after moving focus to another window and coming back

Answered

I am running the latest version of CLion (2018.2.2), and have noticed this issue. If I move the focus away from the CLion window and then back without using my mouse, I can't type on the editor anymore until I click it, or until I press Ctrl+Tab and select the file being edited. When I switch back to CLion from another application using the keyboard, if I press the Return key, new lines are added to the current file being edited, but that is the only key that works.

I've made a GIF that shows the issue.

I am using the i3 window manager.

$ java --version
java 10.0.2 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)

 

Here is the GIF:

 

 

Has anyone faced this issue? If so, how did you fix it?

Edit: I have IdeaVIM enabled in this case. I tried disabling it to see if that was causing the issue, but the issue persisted. So it is not IdeaVIM's fault. 

Thanks!

4
8 comments
Avatar
Permanently deleted user

Alright, I think I kinda figured this out. I am not sure why the issue happens, but I figured how to get it working as expected.

After you open CLion (or IDEA, or any of the IDEs to be honest), if this issue presents itself, all that needs to be done is to restart i3 in place. In my case this means pressing $mod+Shift+r (that sequence is bound to the restart command). After that, when you focus the window using the keyboard shortcut, the focus goes back to the editor as expected and you can type again. If you close the IDE and reopen it, the issue will present itself back and then you need to do the restart thing again.

 

2

Hello!

Looks like https://youtrack.jetbrains.com/issue/IDEA-194124, it should be fixed in CLion 2018.3 EAP build which is going to be released in September. When the program starts, you will be able to find the EAP builds here: https://www.jetbrains.com/clion/nextversion/.

Meanwhile you can try disabling suppress.focus.stealing: go to Help | Find Action, type "Registry...", select it and in the opened list find and disable the suppress.focus.stealing option, restart CLion.

0
Avatar
Permanently deleted user

I'm facing this for a while on PHPStorm. Only reopen PHPStorm to fix and it will come again :D

0

Restarting i3 in place after launching the ide works for me, thank you.

2
Avatar
Permanently deleted user

Anna Falevskaya @...

The solution of suppress.focus.stealing=false worked fine for me until 2020.1 updates.

I've tested PyCharm and CLion and for both lose focus again now, even with suppress.focus.stealing=false.

 

@... is this the same for you on 2020.1?

Anna Falevskaya any ideas?

0

@Daniel Speck, you can try setting both

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

as suggested in the comments to https://youtrack.jetbrains.com/issue/IDEA-194124.

If it doesn't help, please ask for help in the comments to the issue.

0
Avatar
Permanently deleted user

Anna Falevskaya

thank you very much for the quick response!

This helped, focus works again :)

0

not working for phpstorm 2020.2

0

Please sign in to leave a comment.