hyprwm / Hyprland

Hyprland is a highly customizable dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
18.03k stars 753 forks source link

Abnormal Display in JetBrains IDEs #5942

Open love-yuri opened 2 months ago

love-yuri commented 2 months ago

Hyprland Version

System/Version info ```sh Hyprland, built from branch at commit fe7b748eb668136dd0558b7c8279bfcd7ab4d759 (props: bump version to 0.39.1). Date: Tue Apr 16 16:01:03 2024 Tag: v0.39.1, commits: 4460 flags: (if any) System Information: System name: Linux Node name: yuri Release: 6.8.9-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Thu, 02 May 2024 17:49:46 +0000 GPU information: 03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Lucienne [1002:164c] (rev c2) (prog-if 00 [VGA controller]) os-release: NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo ```

Bug or Regression?

Bug

Description

This is my first time raising issues. I've spent some time searching for similar problems, but haven't found anything quite like mine. Also, it was working fine just over a month ago, and it changed after an update. I'm not sure if this is a JetBrains issue or a Hyprland issue, so I'm submitting the issues here. If there's any problem, please forgive me, and thank you in advance for any assistance!

All secondary windows or pop-ups are directly tiled instead of floating. Additionally, some interfaces fail to open correctly and keep flickering.

This issue is present in all IDEs within the JetBrains series, as it has been tested and observed in WebStorm, IntelliJ IDEA, and Android Studio.

I have tried the following operations, but none of them have had any effect:

  1. Updating Hyprland and reinstalling it.
  2. Reinstalling the JetBrains series IDE.
  3. Setting rules for their secondary windows.
        windowrule = float,title:^(win.*)$
  4. Setting rules directly for them.
        windowrulev2 = float, class:^(jetbrains-studio)$

https://github.com/hyprwm/Hyprland/assets/146157054/94850b17-1cc8-4fa3-aa4b-3d89a662c389

Possible useful information

hyprctl clients

    Window 5ddc0b611740 -> exp6 – RightFragment.kt [exp6.app.main]:
    mapped: 1
    hidden: 0
    at: 12,57
    size: 2536,1531
    workspace: 5 (5)
    floating: 0
    monitor: 0
    class: jetbrains-studio
    title: exp6 – RightFragment.kt [exp6.app.main]
    initialClass: jetbrains-studio
    initialTitle:  
    pid: 19269
    xwayland: 1
    pinned: 0
    fullscreen: 0
    fullscreenmode: 0
    fakefullscreen: 0
    grouped: 0
    swallowing: 0
    focusHistoryID: 1

❯ android-studio --version CompileCommand: exclude com/intellij/openapi/vfs/impl/FilePartNodeRoot.trieDescend bool exclude = true Android Studio Iguana | 2023.2.1 Patch 2 Build #AI-232.10300.40.2321.11668458

The complete configuration file.

    $mainMod = SUPER

# 控制显示器输出
#monitor=eDP-1, disable
# monitor=eDP-1, 2560x1600, 0x0, 1
monitor=,preferred,auto,1
# monitor=,preferred,auto,1,mirror,eDP-1
# monitor=HDMI-A-1,2560x1440@120,0x0,1
exec-once=waybar #bar
exec-once=dunst --title dunst #通知守护进程
exec-once=swaybg -o \* -i /home/yuri/Pictures/wallhaven/wallhaven-wyz9gx_3840x2160.png  -m fill #设置壁纸
exec-once=fcitx5 --replace -d 
exec-once=/opt/clash/cfw &
# exec-once = ags -b hypr
# My Custom Start Page (Bento)
exec-once=swayidle -w timeout 1800 'swaylock' #锁屏
exec-once=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
# 启动必要进程
#exec-once=systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
#exec-once=~/.config/hypr/scripts/screensharing.sh

# 剪贴板
exec-once=wl-paste --type text --watch cliphist store
exec-once=wl-paste --type image --watch cliphist store

env = XMODIFIERS, @im=fcitx
env = QT_IM_MODULE, fcitx
env = SDL_IM_MODULE, fcitx
env = GDK_BACKEND, wayland,x11
env = QT_QPA_PLATFORM, wayland;xcb
env = QT_WAYLAND_DISABLE_WINDOWDECORATION, 1
env = QT_AUTO_SCREEN_SCALE_FACTOR, 1
env = CLUTTER_BACKEND, wayland
env = ADW_DISABLE_PORTAL, 1
env = XCURSOR_SIZE,24
env = XCURSOR_THEME,Dracula-cursors
env = HYPRCURSOR_THEME,hyprcursor_Dracula
env = HYPRCURSOR_SIZE,24
# env = LANG, zh_CN.UTF-8
env = LANGUAGE, zh_CN:en_US
# bluetoothctl connect 6C:D3:EE:63:13:05

# 一些键盘配置
input {
  # Remap Capslock -> Esc for Vim users  
  kb_options=caps:escape
  repeat_rate=50
  repeat_delay=240

  touchpad {
    disable_while_typing=1
    natural_scroll=1
    clickfinger_behavior=1
    middle_button_emulation=0
    tap-to-click=1
  }
}

gestures { 
  workspace_swipe=true  # 允许通过手势操作来切换工作区
  workspace_swipe_min_speed_to_force=5  # 手势的最小速度,以触发工作区切换操作
  workspace_swipe_distance = 2000
  workspace_swipe_fingers = 3
  workspace_swipe_cancel_ratio = 0.2
  workspace_swipe_create_new = true

}

general {
  layout=dwindle  # 窗口管理器的排列方式为 dwindle
  sensitivity=1.0 # 鼠标指针的灵敏度
  gaps_in=11.8    # 窗口之间的内边距大小
  gaps_out=10   # 窗口之间的外边距大小
  border_size=2   # 窗口边框的大小
  col.active_border=0xfff5c2e7     # 活动窗口边框的颜色
  col.inactive_border=0x66333333   # 非活动窗口边框的颜色
  apply_sens_to_raw=0 # 是否应用鼠标灵敏度设置到原始输入上(例如,在需要通过鼠标进行游戏操作时)
}

decoration {
  # multisample_edges = true # 圆角抗锯齿
  rounding=12  # 窗口边框圆角大小
  drop_shadow=true  # 是否添加窗口阴影效果
  shadow_range=4  # 阴影的模糊半径大小
  shadow_render_power = 3
  col.shadow=0xf4a7caff #86AAEC  # 阴影的颜色(活动窗口)
  col.shadow_inactive=0x50000000  # 阴影的颜色(非活动窗口)
  blur {
    enabled = true
    xray = true
    size = 5
    passes = 2
    new_optimizations = on
    noise = 0.02
    contrast = 1.6
    brightness = 1.1
    special = false
    contrast = 1
    brightness = 1
  }
  active_opacity=0.9     # 活动窗口透明度
  inactive_opacity=0.9   # 非活动窗口透明
}

# Blur for waybar 
blurls=waybar

animations {
  enabled = yes

  # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more

  bezier = myBezier, 0.05, 0.9, 0.1, 1.05
  bezier = myBezier_2, 0.13,0.99,0.29,1.1

  animation = windows, 1, 5.6, myBezier
  animation = windowsOut, 1, 7, default, popin 80%
  animation = border, 1, 10, default
  animation = borderangle, 1, 8, default
  animation = fade, 1, 7, default
  animation = workspaces, 1, 9.9, myBezier_2, slide
}

master {
  new_on_top=true
  no_gaps_when_only = true  # 当只有一个窗口时,不使用间隙
}

# disable_hyprland_logo=true:禁用 Hyprland 的 logo;
# disable_splash_rendering=true:禁用启动屏幕的渲染;
# mouse_move_enables_dpms=true:启用鼠标移动唤醒屏幕保护;
# vfr = true:启用可变帧率;
# hide_cursor_on_touch = true:在触摸屏幕时隐藏光标
misc {
  vfr = true
  vrr = 1
  focus_on_activate = true
  animate_manual_resizes = false
  animate_mouse_windowdragging = false
  #suppress_portal_warnings = true
  enable_swallow = true
  mouse_move_enables_dpms = true
  key_press_enables_dpms = true

  disable_hyprland_logo = true
}

dwindle {
  # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
  pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
  preserve_split = yes # you probably want this
}

xwayland {
  force_zero_scaling = true
}

# 设置显示效果

# 飞翔终端动画
windowrule = center,title:^(fly_is_kitty)$
windowrule = size 60% 40%,title:^(fly_is_kitty)$
windowrule = float,title:^(fly_is_kitty)$

# jeb
windowrule = float,title:^(win.*)$
windowrulev2 = float, class:^(jetbrains-studio)$
windowrule = float,title:^(确认退出)$

# 网易云音乐
windowrulev2 = float, class:^(netease-cloud-music)$
windowrulev2 = center, class:^(netease-cloud-music)$
windowrulev2 = size 70% 70%, class:^(netease-cloud-music)$

# yesplaymusic
windowrulev2 = float, class:yesplaymusic
windowrulev2 = size 70% 70%, class:yesplaymusic
windowrulev2 = center, class:yesplaymusic

# yuri的阮家
windowrulev2 = float, title:yuri

# wps 全家桶
windowrule = tile,title:^(WPS)(.*)$
windowrulev2 = tile, class:wps
windowrulev2 = tile, class:wpspdf
windowrulev2 = tile, class:pdf
windowrulev2 = tile, class:et
windowrulev2 = tile, class:wpp
windowrulev2 = float, title:^(Ark)$
windowrulev2 = float, class:^(Ark)$
windowrulev2 = float, title:rofi.*
windowrulev2 = float, class:xyz.chatboxapp.app

# clash
windowrulev2 = float, class:Clash for Windows
windowrulev2 = size 70% 70%, class:Clash for Windows
windowrulev2 = center, class:Clash for Windows

#datagrip
windowrulev2 = float, class:jetbrains-datagrip

# # QQ
# windowrulev2 = float, class:QQ
# windowrulev2 = size 60% 60%, class:QQ
# windowrulev2 = move center top, class:QQ
# windowrulev2 = float, title:图片查看器
# windowrulev2 = float, title:dunst

windowrulev2 = opacity 0.8 override 0.8 override, class:^(kitty)$
windowrulev2 = opacity 0.9 override 0.9 override, class:^(Code)$
windowrulev2 = opacity 0.9 override 0.9 override, class:^(Typora)$

windowrulev2 = float, class:^(.*fcitx.*)$
windowrulev2 = float, class:^(org.kde.polkit-kde-authentication-agent-1)$
windowrulev2 = opacity 1.0 override 1.0 override, class:^(Google-chrome)$
windowrulev2 = opacity 0.9 override 0.9 override, class:^(QQ)$
windowrulev2 = float, class:^(QQ)$
windowrulev2 = float, class:^(kruler)$
windowrulev2 = float,title:^(查看媒体)$|^(图片查看)$|^(图片查看器)$|^(KDE)$
windowrulev2 = float, class:^(yuri)$
windowrulev2 = float, class:^(feishu)$
windowrulev2 = size 75% 75%, class:^(QQ)$
windowrulev2 = center, class:^(QQ)$

windowrule=float,title:^(Open File)(.*)$
windowrule=float,title:^(Open Folder)(.*)$
windowrule=float,title:^(Save As)(.*)$
windowrule=float,title:^(Library)(.*)$ 
windowrule=nofocus,title:^(.*)(mvi)$

# thunar 文件管理
windowrulev2 = size 75% 75%, class:^(Thunar)$
windowrulev2 = center, class:^(Thunar)$

# windowrulev2 = opacity 0.5 override 0.5 override, class:^(code)$
# windowrule=class: /usr/bin/google-chrome-stable,fullscreen=on
# windowrule=class: /usr/bin/google-chrome-stable,workspace=3
# windowrule=fullscreen on, /usr/bin/google-chrome-stable

# jetbrains

windowrulev2 = float, title:^(设置)$
windowrulev2 = float, title:^(每日小技巧)$

layerrule = blur, waybar
layerrule = ignorealpha 0.8, eww
# layerrule = noanim, noanim
# layerrule = blur, noanim
layerrule = blur, powermenu
layerrule = blur, gtk-layer-shell
layerrule = ignorezero, gtk-layer-shell
# layerrule = blur, launcher
# layerrule = ignorealpha 0.5, launcher
# layerrule = noanim, launcher
layerrule = blur, notifications
layerrule = ignorealpha 0.69, notifications

# 截屏
$screen_file=${HOME}/Pictures/ScreenShot/$(date '+%Y-%m-%d-%H-%M-%S').png
bind=,PRINT,  exec, grim $screen_file
bind=$SUPER, P,exec, grim -g "$(slurp)" - | wl-copy

# 常用应用启动
bind=ALT, 1, exec , code
bind=ALT, 2, exec , /usr/bin/google-chrome-stable --gtk-version=4
bind=ALT, 3, exec , /opt/Typora/Typora
bind=ALT, 4, exec , netease-cloud-music
bind=ALT, 5, exec , linuxqq

exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP #更新用户变量

How to reproduce

I'm not sure if others are experiencing this issue, so if it's unique to me, I apologize.

Crash reports, logs, images, videos

No response

love-yuri commented 2 months ago

Additional Note: The same issue is present in WPS Writer and WPS Presentation as well.

vaxerski commented 2 months ago

WPS

image ...

This sounds like an intellij issue. It works fine on my end with no rules, though.

love-yuri commented 2 months ago

I'm going to try reinstalling the entire Linux system to see if that resolves the issue. Apart from the JetBrains IDEs and WPS Writer, it seems like everything else is functioning normally.

jilen commented 1 month ago

Are you using nvidia gpu ?

Flickering of xwayland apps is a known issue due to lack of implicit v-sync. It might be solved in the next xwayland version with the explicit v-sync implemented. https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967

You may build the 24.xxx (aur) version for now.

love-yuri commented 1 month ago

Are you using nvidia gpu ?

Flickering of xwayland apps is a known issue due to lack of implicit v-sync. It might be solved in the next xwayland version with the explicit v-sync implemented. https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967

You may build the 24.xxx (aur) version for now.

I don't use NVIDIA graphics cards; I only use AMD integrated graphics.

antkss commented 1 month ago

i got things too image this is my qt app with QT_QPA_PLATFORM=xcb image

and this is my qt app with QT_QPA_PLATFORM=wayland, but wayland seem to be better

JonathanSteininger commented 1 month ago

All the windows correctly float by default for me when using android-studio. version: 2023.1.1 Patch 2

I do not recommend adding windowrules to jetbrains pop-out windows. Pretty much everything is a popout window. so you are very likely to break something when adding a windowrule to any of them.

Hyprland crashed when I tried to force all pop-outs to tile and a code suggestion window gets created. Pretty sure this is android-studios fault. But I would have expected at minimum the window to be killed instead of the compositor crashing.