[BUG]: Komorebi causes flickering in 2024 JetBrains IDEs
Insprill opened this issue · comments
Describe the bug
When Komorebi is running, it causes the 2024 edition JetBrains IDEs (reproducible with IntelliJ and Rider) to flicker whenever a window event happens, including to other windows.
To Reproduce
Steps to reproduce the behavior:
- Open a 2024.1 edition instance of IntelliJ/Rider/Other JetBrains IDE.
- Focus on/off of it, or between other applications never touching the IDE.
- Observe it flickering when doing so.
- It will also flicker whenever most popups are opened/closed during code editing.
Expected behavior
It should not flicker
Screenshots and Videos
komorebi-jetbrains-flicker.mp4
Operating System
OS Name: Microsoft Windows 11 Pro for Workstations
OS Version: 10.0.22631 N/A Build 22631
komorebic check
Output
No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\Insprill
Looking for configuration files in C:\Users\Insprill
Found komorebi.json; this file can be passed to the start command with the --config flag
No ~/.config/whkdrc found; you may not be able to control komorebi with your keyboard
Aditional Context
I'm using Komorebi built from 740cb3c
This is either Windows compositor bug or a JetBrains rendering bug; if you open tickets with either MS or JetBrains please link them here for tracking.
I don't know enough about the inner workings of these systems to make a proper report to either, so I'll leave that to someone else. Two other things to note are that 2023 and older IDEs are fine, and the flickering isn't as bad in person as they are in the recording (recorded with AMD Adrenalin), but it's still very much present and quite distracting.
do you get the flicker if you turn off the active window border?
I do, yes.
i used to use pycharm and i remember it had flickering issue in some situations (without komorebi). Maybe it is worth it to ask in their community forum too.
https://intellij-support.jetbrains.com/hc/en-us/community/topics
Hi @Insprill, I am sorry to hear that you are dealing with this issue too. My main issue was heavy flickering whenever I opened a context menu or used Ctrl + Tab to switch files.
I have been trying a lot of workarounds from other posts on Jetbrains flickering and none of them really worked. However, I found something that for me seems to solve the flickering, hopefully it works for you too. For your info, I am running the following setup:
komorebi v0.1.25
PyCharm 2024.1.1 Community, Build #PC-241.15989.155
Windows 10 2H22, Build 19045.4291
My solution involved switching to a different Java JDK to run PyCharm. By default, it was running on a bundled version (17). I installed the latest Java JDK from the official website (version 22.0.1) and selected it as follows:
Help -> Find Action... -> Choose Boot Java Runtime for the IDE...
In this window open drop-down Select Runtime
and choose Add custom runtime
. Then choose the path to the installed runtime and restart the IDE when prompted.
Hopefully this process works similarly in other JetBrains IDEs. Note that it is not a perfect fix, at least for me the 'active window border' still flickers whenever I open a context menu or switch files, but at least the main window stays stable (which makes it much less distracting).
Please let me know if this works for you.
Yup, this indeed worked for me! It appears to be an issue with their runtime. I tested with Adoptium and Graal 17 and 22, and it isn't present in either, but it's present in all versions of their runtime listed in the IDE (17 and 21). I created an issue on their runtime repo for it - hopefully, something will come of it. Thank you for the workaround in the meantime!
Can you link the JetBrains ticket here as well please? 🙏
GitHub shows it in the history just above my comment, but here it is as well:
JetBrains/JetBrainsRuntime#379
Ah thanks! I was looking on my phone and all the old comments were folded away 😅
I re-created the issue on YouTrack - I'm not sure why they have GitHub issues enabled as it looks like they don't check them.
https://youtrack.jetbrains.com/issue/JBR-7123/Flicker-when-changing-focused-window-with-Komorebi
I tested this all day (since it was committed), and I haven't noticed any flickering!
Tentatively going to close this as the flickering is gone even without the use of a custom runtime 🤞
Tested it too, works perfectly now with the default runtime. Thank you so much!