hyprwm / Hyprland

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

CLion/IntelliJ tab reorder extremely finicky (=unusable) #8395

Open w0utert opened 4 days ago

w0utert commented 4 days ago

Already reported ? *

Regression?

No

System Info and Version

System/Version info ```sh Hyprland, built from branch at commit 4520b30d498daca8079365bdb909a8dea38e8d55 (version: bump to 0.44.1). Date: Wed Oct 9 12:54:39 2024 Tag: v0.44.1, commits: 5309 built against aquamarine 0.4.3 flags: (if any) System Information: System name: Linux Node name: yin Release: 6.11.6-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Fri, 01 Nov 2024 03:30:41 +0000 GPU information: c3:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 [1002:15bf] (rev 03) (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 plugins: ======Config-Start====== Config File: /home/wouter/.config/hypr/hyprland.conf: Read Succeeded # # Please note not all available settings / options are set here. # For a full list, see the wiki # autogenerated = 0 # remove this line to remove the warning # See https://wiki.hyprland.org/Configuring/Monitors/ monitor=eDP-1,2944x1840,0x0,1.6 monitor=DP-8,3840x2160,3840x0,1.0 monitor=DP-11,3840x2160,0x0,1.0 # Lid switch trigger turn off laptop screen bindl = ,switch:off:Lid Switch,exec,~/.config/hypr/force-screens.sh open bindl = ,switch:on:Lid Switch,exec,~/.config/hypr/force-screens.sh close # Wallpapers $w1 = hyprctl hyprpaper wallpaper "eDP-1,contain:~/.config/hypr/wallpaper-1.jpg" $w2 = hyprctl hyprpaper wallpaper "eDP-1,contain:~/.config/hypr/wallpaper-2.jpg" $w3 = hyprctl hyprpaper wallpaper "eDP-1,contain:~/.config/hypr/wallpaper-3.jpg" # See https://wiki.hyprland.org/Configuring/Keywords/ for more # Execute your favorite apps at launch exec-once = waybar & hyprpaper & dunst & /usr/lib/polkit-kde-authentication-agent-1 exec = ~/.config/hypr/force-screens.sh # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf # Set programs that you use $terminal = kitty $fileManager = nautilus $menu = wofi --show drun # Some default env vars. env = LANG,en_US.UTF-8 env = LC_ALL,en_US.UTF-8 env = XCURSOR_SIZE,24 env = QT_QPA_PLATFORMTHEME,qt5ct env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 env = GDK_BACKEND,wayland,x11 env = SDL_VIDEODRIVER,wayland env = CLUTTER_BACKEND,wayland env = XDG_CURRENT_DESKTOP,Hyprland env = XDG_DESKTOP_SESSION,Hyprland # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { kb_layout = us kb_variant = kb_model = kb_options = kb_rules = follow_mouse = 1 touchpad { natural_scroll = yes clickfinger_behavior = 1 } sensitivity = 0 # -1.0 - 1.0, 0 means no modification. } general { # See https://wiki.hyprland.org/Configuring/Variables/ for more gaps_in = 4 gaps_out = 10 border_size = 2 col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.inactive_border = rgba(595959aa) layout = dwindle # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on allow_tearing = false } decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more rounding = 4 blur { enabled = true size = 3 passes = 1 } drop_shadow = yes shadow_range = 4 shadow_render_power = 3 col.shadow = rgba(1a1a1aee) } 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 animation = windows, 1, 7, 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, 6, default } 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 } master { # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more } gestures { # See https://wiki.hyprland.org/Configuring/Variables/ for more workspace_swipe = on } misc { # See https://wiki.hyprland.org/Configuring/Variables/ for more force_default_wallpaper = 0 # Set to 0 to disable the anime mascot wallpapers disable_hyprland_logo = 1 background_color=0x000000 vrr=1 } # Example per-device config # See https://wiki.hyprland.org/Configuring/Keywords/#executing for more #device:epic-mouse-v1 { # sensitivity = -0.5 #} # Example windowrule v1 # windowrule = float, ^(kitty)$ # Example windowrule v2 # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more #windowrulev2 = nomaximizerequest, class:.* # You'll probably like this. windowrulev2 = opacity 0.9,class:^(kitty)$ windowrulev2 = nofocus,class:^jetbrains-(?!toolbox),floating:1,title:^win\d+$ # Prevents jetbrains menu to disrupt window focus windowrulev2 = float,title:^ImPipe$ windowrulev2 = float,class:^pavucontrol$ windowrulev2 = float,class:^firefox$,title:^Library$ windowrulev2 = center,class:^firefox$,title:^Library$ windowrulev2 = size 1800 1000,class:^firefox$,title:^Library$ windowrulev2 = float,class:^chrome-.+-Default$ windowrulev2 = size 30% 60%,class:^chrome-.+-Default$ # See https://wiki.hyprland.org/Configuring/Keywords/ for more $mainMod = SUPER # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, Q, exec, $terminal bind = $mainMod, B, exec, chromium bind = $mainMod, C, killactive, bind = $mainMod, M, exit, bind = $mainMod, E, exec, $fileManager bind = $mainMod, V, togglefloating, bind = $mainMod, R, exec, $menu bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, J, togglesplit, # dwindle bind = $mainMod, Z, swapsplit, # dwindle bind = $mainMod, F, fullscreen, 1 bind = $mainMod, S, exec, ~/.config/hypr/force-screens.sh bind = $mainMod, `, exec, systemctl shutdown # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l bind = $mainMod, right, movefocus, r bind = $mainMod, up, movefocus, u bind = $mainMod, down, movefocus, d # Swap windows with ctrl-mainMod + arrow keys bind = $mainMod ALT, right, swapwindow, r bind = $mainMod ALT, left, swapwindow, l bind = $mainMod ALT, up, swapwindow, u bind = $mainMod ALT, down, swapwindow, d bind = $mainMod, tab, swapactiveworkspaces #bind = $mainMod ALT, tab, moveworkspacetomonitor,1 current #bind = $mainMod ALT, tab, workspace,1 # Switch workspaces with mainMod + [0-9] bind = $mainMod, 1, workspace, 1 bind = $mainMod, 1, exec, $w1 bind = $mainMod, 2, workspace, 2 bind = $mainMod, 2, exec, $w2 bind = $mainMod, 3, workspace, 3 bind = $mainMod, 3, exec, $w3 bind = $mainMod, 4, workspace, 4 bind = $mainMod, 4, exec, $w1 bind = $mainMod, 5, workspace, 5 bind = $mainMod, 5, exec, $w2 bind = $mainMod, 6, workspace, 6 bind = $mainMod, 6, exec, $w3 bind = $mainMod, 7, workspace, 7 bind = $mainMod, 7, exec, $w1 bind = $mainMod, 8, workspace, 8 bind = $mainMod, 8, exec, $w2 bind = $mainMod, 9, workspace, 9 bind = $mainMod, 9, exec, $w3 bind = $mainMod, 0, workspace, 10 bind = $mainMod, 0, exec, $w1 # Move active window to a workspace with mainMod + SHIFT + [0-9] bind = $mainMod SHIFT, 1, movetoworkspace, 1 bind = $mainMod SHIFT, 2, movetoworkspace, 2 bind = $mainMod SHIFT, 3, movetoworkspace, 3 bind = $mainMod SHIFT, 4, movetoworkspace, 4 bind = $mainMod SHIFT, 5, movetoworkspace, 5 bind = $mainMod SHIFT, 6, movetoworkspace, 6 bind = $mainMod SHIFT, 7, movetoworkspace, 7 bind = $mainMod SHIFT, 8, movetoworkspace, 8 bind = $mainMod SHIFT, 9, movetoworkspace, 9 bind = $mainMod SHIFT, 0, movetoworkspace, 10 # Toggle waybar with mainMod + K bind = $mainMod, K, exec, killall waybar || waybar # Example special workspace (scratchpad) bind = $mainMod, S, togglespecialworkspace, magic bind = $mainMod SHIFT, S, movetoworkspace, special:magic # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow ======Config-End======== ```

Description

When trying to mover/reorder tabs using mouse drag in IntelliJ IDE's (in my case CLion), if the mouse drag is not perfectly horizontal (moves only one pixel up/down), Hyprland will abort the drag operation and flip into what looks like an invalid drop/dock operation.

As soon as the drag moves only a single pixel in Y, a new Hyprland window with just the name of the tab is created in the middle of the screen, and CLion seems to think the dragged tab needs to be dropped somewhere, but this is not working. This makes is pretty much impossible to reorder tabs as it requires surgical precision controlling the mouse.

I never encountered this problem with CLion on other compositors or on X11

How to reproduce

Just open CLion (or probably any other JetBrains IDE), open some tabs and try to reorder them.

Crash reports, logs, images, videos

Video of me trying to reorder tabs (also failing a few times to grab them but that's not because a Hyprland issue):

https://github.com/user-attachments/assets/7ba1a6b6-50ec-4442-aa6a-0bae05b30fea

MightyPlaza commented 4 days ago

run it in native wayland mode https://blog.jetbrains.com/platform/2024/07/wayland-support-preview-in-2024-2/

w0utert commented 4 days ago

@MightyPlaza I'm already running it in native wayland mode

MightyPlaza commented 4 days ago

@MightyPlaza I'm already running it in native wayland mode

are you sure? what does hyprctl clients say?

w0utert commented 4 days ago

Yes I have the WLToolkit option enabled in the Java settings and fractional scaling works (with XWayland it doesn't)

Relevant bits from hyprctl clients:

Window 61e2659a5b50 -> impipe [~/coding/work/impipe] – compute_device.cpp:
    mapped: 1
    hidden: 0
    at: 12,12
    size: 1816,1126
    workspace: 2 (2)
    floating: 0
    pseudo: 0
    monitor: 0
    class: jetbrains-clion
    title: impipe [~/coding/work/impipe] – compute_device.cpp
    initialClass: jetbrains-clion
    initialTitle: 
    pid: 1807
    xwayland: 0
    pinned: 0
    fullscreen: 0
    fullscreenClient: 0
    grouped: 0
    tags: 
    swallowing: 0
    focusHistoryID: 2
MightyPlaza commented 4 days ago

Yes I have the WLToolkit option enabled in the Java settings and fractional scaling works (with XWayland it doesn't)

Relevant bits from hyprctl clients:

Window 61e2659a5b50 -> impipe [~/coding/work/impipe] – compute_device.cpp:
  mapped: 1
  hidden: 0
  at: 12,12
  size: 1816,1126
  workspace: 2 (2)
  floating: 0
  pseudo: 0
  monitor: 0
  class: jetbrains-clion
  title: impipe [~/coding/work/impipe] – compute_device.cpp
  initialClass: jetbrains-clion
  initialTitle: 
  pid: 1807
  xwayland: 0
  pinned: 0
  fullscreen: 0
  fullscreenClient: 0
  grouped: 0
  tags: 
  swallowing: 0
  focusHistoryID: 2

that's strange my guess would be a clion issue which means it should also happen on other wayland compositors (wlroots based specially) when running on native wayland mode

w0utert commented 4 days ago

I just tried with KDE, and while it has the same behavior, it is much less finicky over there, the amount of movement in Y before CLion decides to go into drop mode is about double of what it is in Hyprland. In KDE it's annoying but still usable, in Hyprland it is nearly impossible to drag any tabs at all.

You are probably correct that this may be a problem on the CLion side but then again it is strange Hyprland is much more sensitive to it considering the size/height of the tabs as displayed on screen is similar between KDE and Hyprland on my system.

MightyPlaza commented 4 days ago

like I said, hyprland is like to have the same behaviour as similar wlroots based compositors like sway, for example best solution is likely open an issue / check for an existing one in jetbrains tracker (maybe https://youtrack.jetbrains.com/issue/JBR-5860/Wayland-implement-drag-and-drop-support)

qweered commented 4 days ago

Have same issue in Webstorm and with Vivaldi browser tabs reordering (both run in native Wayland)

w0utert commented 3 days ago

@MightyPlaza just checked on macOS, and CLion has very similar behavior there, except (just like KDE wayland) it is much less sensitive. So I don't think there is a bug in CLion itself, because it behaves the same everywhere.

The only difference on Hyprland, is that the drag & drop sensitivity for Y-movement is ridiculously high to the point it makes dragging & dropping tabs nearly impossible. Since KDE wayland doesn't have this to nearly the same degree, my guess is that it's not a problem in the Wayland protocol or how CLion uses it, but in some aspect of Hyprland's implementation, maybe there is some drag => drop threshold somewhere in the code that needs a little tweaking?

hotsno commented 1 day ago

Edit: Most of this message is irrelevant to Hyprland

The bigger problem is that once the tab is detached there's no way to reattach it. The intended functionality is being able to reattach it anywhere in the tab bar, or make a new split if you drop on the editor itself.

Drag and dropping files in the file explorer (to move them around) also just straight up doesn't work.

Not sure how solveable this is on Hyprland's end, but JetBrains IDEs are unfortunately unusable for me atm (I'm sure there are other issues, I've only spent like 30 mins in IntelliJ)

Edit: Most "Drag and and drop" functionality probably just isn't supported by the IDE itself on Wayland yet

Edit 2: Drag and drop feature issue tracker

w0utert commented 22 hours ago

I've also filed https://youtrack.jetbrains.com/issue/CPP-42069/Dragging-reordering-tabs-is-nearly-impossible-in-Wayland-native-mode so let's see if/what JetBrains has something to say about it.

I'm still not fully convinced this is only a JetBrains problem, considering in KDE Wayland reordering tabs works better than in Hyprland.

I will close this if it turns out the problem is completely on the JetBrains side.