Hyprland
Hyprland copied to clipboard
Popups in IntelliJ Idea break input
Hyprland Version
88b63a00b68350d6d001445357a2582ab5975f9c
Bug or Regression?
Regression
Description
Something has been broken recently with IntelliJ intellisense popups. They start stealing focus from the main window thus breaking keyboard input.
How to reproduce
- Install IntelliJ Idea
- Create a project in any language
- Start typing and make the intellisense popup appear
- The main intellij window will lose the focus regardless of
input:follow_mouseand mouse position. So it won't be possible to continue typing or to select anything in the popup using the keyboard - You would have to manually refocus main window
Crash reports, logs, images, videos
No response
This looks like https://github.com/hyprwm/Hyprland/issues/3012 but it worked for me before
Suggested fix (windowrulev2 = noborder, class:^(jetbrains-idea)(.*)$) does not help.
windowrulev2 = noinitialfocus,class:^(jetbrains-.*),title:^(win.*) seemingly makes things better (but still imperfect).
It seems like this helps (but still, sometimes the main window loses focus during editing):
input {
follow_mouse = 2
float_switch_override_focus = 0
}
windowrulev2 = noinitialfocus,class:^(jetbrains-.*),title:^(win.*)
Currently I'm using the following rules which make the editor barely usable:
input {
float_switch_override_focus=0
follow_mouse=2
mouse_refocus=1
}
xwayland {
force_zero_scaling=true
}
windowrulev2 = noinitialfocus,class:^(jetbrains-.*),title:^(win.*)
windowrulev2 = noborder, class:^(jetbrains-idea)(.*)$
Unfortunately the "noinitialfocus" rule completely breaks the menus:
Moreover, noinitialfocus is not a reliable fix, it's just makes things better. The editor still loses focus from time to time.
@pshirshov These are my window rules which fix a bunch of issues I've come across. These focus issues are related to xwayland applications running under wl-roots as the same problems happen in Sway as well.
# -- Fix odd behaviors in IntelliJ IDEs --
#! Fix focus issues when dialogs are opened or closed
windowrulev2 = windowdance,class:^(jetbrains-.*)$,floating:1
#! Fix splash screen showing in weird places and prevent annoying focus takeovers
windowrulev2 = center,class:^(jetbrains-.*)$,title:^(splash)$,floating:1
windowrulev2 = nofocus,class:^(jetbrains-.*)$,title:^(splash)$,floating:1
windowrulev2 = noborder,class:^(jetbrains-.*)$,title:^(splash)$,floating:1
#! Center popups/find windows
windowrulev2 = center,class:^(jetbrains-.*)$,title:^( )$,floating:1
windowrulev2 = stayfocused,class:^(jetbrains-.*)$,title:^( )$,floating:1
windowrulev2 = noborder,class:^(jetbrains-.*)$,title:^( )$,floating:1
#! Disable window flicker when autocomplete or tooltips appear
windowrulev2 = nofocus,class:^(jetbrains-.*)$,title:^(win.*)$,floating:1
Also add suppress.focus.stealing=false to your IDE properties.
I should mention that these do not "fix" everything. In my case, using a multi monitor setup will cause popups to open where ever they want sometimes. But at least the editor focus issues are fixed
Menus rendering remains broken with these properties.
The biggest issue I have now is that the autocomplete popup rendering has been broken since 0.30 in hyprland. The key to the focus issues with the editor is the windowdance rule though
The biggest issue I have now is that the autocomplete popup rendering has been broken since 0.30 in hyprland.
Same here, do you have any recommended fixes for now? It seems that the window size is fine, it's the inner rendering of it?
Currently I'm using the following rules which make the editor barely usable:
... windowrulev2 = noinitialfocus,class:^(jetbrains-.*),title:^(win.*)Unfortunately the "noinitialfocus" rule completely breaks the menus
BTW that also applies to the waybar tooltips (noinitialfocus helps) and its tray-ed apps menus (unreachable)
Currently I'm using the following rules which make the editor barely usable:
... windowrulev2 = noinitialfocus,class:^(jetbrains-.*),title:^(win.*)Unfortunately the "noinitialfocus" rule completely breaks the menus
BTW that also applies to the waybar tooltips (noinitialfocus helps) and its tray-ed apps menus (unreachable)
Using the windowdance rule I have above is the only thing I've found that will keep the editor from constantly losing focus in tandem with the following IDE properties:
suppress.focus.stealing.active.window.checks=true
suppress.focus.stealing.disable.auto.request.focus=true
its far from perfect but I've been daily driving this setup professionally for a few months
The biggest issue I have now is that the autocomplete popup rendering has been broken since 0.30 in hyprland.
Same here, do you have any recommended fixes for now? It seems that the window size is fine, it's the inner rendering of it?
Appears to be an issue tracked in https://github.com/hyprwm/Hyprland/issues/2579
@Blackburn29's fixes (https://github.com/hyprwm/Hyprland/issues/3450#issuecomment-1816761575) seems to fix an issue on Hyprland with the xwl no-scaling patch with IntelliJ's New UI that causes unusable flickering when hovering over the left sidebar buttons.
See here for a demo of someone else having a similar problem in action https://youtrack.jetbrains.com/issue/RIDER-103759
@vaxerski is there any way we can make these settings default, in the Hyprland sample config, or at the very least, document this in the wiki?
Currently I'm using the following rules which make the editor barely usable:
input { float_switch_override_focus=0 follow_mouse=2 mouse_refocus=1 } xwayland { force_zero_scaling=true } windowrulev2 = noinitialfocus,class:^(jetbrains-.*),title:^(win.*) windowrulev2 = noborder, class:^(jetbrains-idea)(.*)$Unfortunately the "noinitialfocus" rule completely breaks the menus: idea-menus.webm
Moreover,
noinitialfocusis not a reliable fix, it's just makes things better. The editor still loses focus from time to time.
noinitialfocus doesnt break the menu with the new jetbrains UI. nofocus meanwhile breaks things like the search popup, or the new file popup. At least in the new UI.
Also add suppress.focus.stealing=false to your IDE properties.
Can someone please tell how/where to add this ?
I went through these but it's still confusing -> https://intellij-support.jetbrains.com/hc/en-us/community/posts/206874755-Don-t-steal-focus?page=3#community_comment_115000586044 https://intellij-support.jetbrains.com/hc/en-us/articles/206544869-Configuring-JVM-options-and-platform-properties https://developer.android.com/studio/intro/studio-config.html#customize_ide
I am using android-studio
Can someone please tell how/where to add this ?
Help -> Edit Custom Properties...
@pshirshov These are my window rules which fix a bunch of issues I've come across. These focus issues are related to xwayland applications running under wl-roots as the same problems happen in Sway as well.
# -- Fix odd behaviors in IntelliJ IDEs -- #! Fix focus issues when dialogs are opened or closed windowrulev2 = windowdance,class:^(jetbrains-.*)$,floating:1 #! Fix splash screen showing in weird places and prevent annoying focus takeovers windowrulev2 = center,class:^(jetbrains-.*)$,title:^(splash)$,floating:1 windowrulev2 = nofocus,class:^(jetbrains-.*)$,title:^(splash)$,floating:1 windowrulev2 = noborder,class:^(jetbrains-.*)$,title:^(splash)$,floating:1 #! Center popups/find windows windowrulev2 = center,class:^(jetbrains-.*)$,title:^( )$,floating:1 windowrulev2 = stayfocused,class:^(jetbrains-.*)$,title:^( )$,floating:1 windowrulev2 = noborder,class:^(jetbrains-.*)$,title:^( )$,floating:1 #! Disable window flicker when autocomplete or tooltips appear windowrulev2 = nofocus,class:^(jetbrains-.*)$,title:^(win.*)$,floating:1Also add
suppress.focus.stealing=falseto your IDE properties.I should mention that these do not "fix" everything. In my case, using a multi monitor setup will cause popups to open where ever they want sometimes. But at least the editor focus issues are fixed
How to fix, popup in android studio not clickable after unfocused from input https://github.com/hyprwm/Hyprland/assets/40895148/800dcaad-e3c5-4d4d-9645-c35011c3e0fe
I've tried a lot of similar things, in the end I've given up on Hyprland for now.
switching to experimental native wayland with jbr pre-release solves many of those issues
For the people using Android Studio, I think the Canary channel has fixes. Will report back, but the popups and autocomplete seem to work fine without any tweaks for now.
switching to experimental native wayland with jbr pre-release solves many of those issues
Could you please instruct me on how to do it?
edit: Found how to do it on JetBrains youtrack https://youtrack.jetbrains.com/issue/JBR-3206/Native-Wayland-support#focus=Comments-27-9421388.0-0
With the beta runtime and the Hyprland config changes, for me, it's gone from crashing outright to just hanging for 10+ seconds half the time when I try to rename an identifier and working fine the other half.
JetBrains IDE's now have experimental Wayland support Please try the versions in their Early Acess Program and see if they fix this issue. Relevant Download links: https://www.jetbrains.com/idea/nextversion/ https://www.jetbrains.com/pycharm/nextversion/ https://www.jetbrains.com/go/nextversion/
OP doesn't seem to still use hyprland, has this been fixed?
OP doesn't seem to still use hyprland, has this been fixed?
Use the latest jbr21 with the WLToolkit flag enabled in the IDE.
OP doesn't seem to still use hyprland, has this been fixed?
I use latest hyprland and intellij version and everything seems to work perfectly. Even coursor being "stuck" is fixed for me now
alr thx @vaxerski