Hyprland: 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

  1. Install IntelliJ Idea
  2. Create a project in any language
  3. Start typing and make the intellisense popup appear
  4. The main intellij window will lose the focus regardless of input:follow_mouse and mouse position. So it won’t be possible to continue typing or to select anything in the popup using the keyboard
  5. You would have to manually refocus main window

Crash reports, logs, images, videos

No response

About this issue

  • Original URL
  • State: open
  • Created 9 months ago
  • Reactions: 11
  • Comments: 20 (2 by maintainers)

Most upvoted comments

@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

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

Can someone please tell how/where to add this ?

Help -> Edit Custom Properties...

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