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.1k stars 882 forks source link

Pointer / Cursor / Mouse warping / teleportation doesn't damage old location. #8142

Open mcourteaux opened 4 days ago

mcourteaux commented 4 days ago

Already reported ? *

Regression?

No

System Info and Version

System/Version info ```sh Hyprland 0.44.0 built from branch main at commit 0baf166d39260c6d1d422cf528fb5fedc3010cdb dirty ([gha] Nix: update inputs). Date: Wed Oct 16 12:01:31 2024 Tag: v0.44.0-46-g0baf166d, commits: 5345 built against aquamarine 0.4.3 flags set: debug System Information: System name: Linux Node name: desktop-martijn Release: 6.10.12-200.fc40.x86_64 Version: #1 SMP PREEMPT_DYNAMIC Mon Sep 30 21:38:25 UTC 2024 GPU information: 09:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU116 [GeForce GTX 1660 Ti] [10de:2182] (rev a1) (prog-if 00 [VGA controller]) NVRM version: NVIDIA UNIX x86_64 Kernel Module 560.35.03 Fri Aug 16 21:39:15 UTC 2024 os-release: NAME="Fedora Linux" VERSION="40 (Sway)" ID=fedora VERSION_ID=40 VERSION_CODENAME="" PLATFORM_ID="platform:f40" PRETTY_NAME="Fedora Linux 40 (Sway)" ANSI_COLOR="0;38;2;60;110;180" LOGO=fedora-logo-icon CPE_NAME="cpe:/o:fedoraproject:fedora:40" DEFAULT_HOSTNAME="fedora" HOME_URL="https://fedoraproject.org/" DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f40/system-administrators-guide/" SUPPORT_URL="https://ask.fedoraproject.org/" BUG_REPORT_URL="https://gitlab.com/fedora/sigs/sway/SIG/-/issues" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_BUGZILLA_PRODUCT_VERSION=40 REDHAT_SUPPORT_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT_VERSION=40 SUPPORT_END=2025-05-13 VARIANT="Sway" VARIANT_ID=sway plugins: ======Config-Start====== Config File: /home/martijn/.config/hypr/hyprland.conf: Read Succeeded # # Please note not all available settings / options are set here. # For a full list, see the wiki # # See https://wiki.hyprland.org/Configuring/Monitors/ source = ~/.config/hypr/monitors.conf # plugin = /usr/local/lib/libhy3.so # See https://wiki.hyprland.org/Configuring/Keywords/ for more # Execute your favorite apps at launch # exec-once = waybar & hyprpaper & firefox # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf # Set programs that you use $terminal = kitty $fileManager = thunar $menu = wofi --show drun $run = wofi --show run $emoji = ~/.config/wofi-emoji/wofi-emoji exec-once = hyperpaper exec-once = waybar # Some default env vars. env = XCURSOR_SIZE,24 env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { kb_layout = be kb_variant = kb_model = kb_options = caps:escape kb_rules = follow_mouse = 1 touchpad { natural_scroll = yes clickfinger_behavior = 1 } sensitivity = 0.0 # -1.0 to 1.0, 0 means no modification. } general { # See https://wiki.hyprland.org/Configuring/Variables/ for more gaps_in = 10 gaps_out = 20 border_size = 2 col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.inactive_border = rgba(595959aa) layout = hy3 # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on allow_tearing = false } render { explicit_sync = 0 explicit_sync_kms = 0 } decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more rounding = 4 blur { enabled = true size = 4 passes = 2 } 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, 3, myBezier animation = windowsOut, 1, 3, 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 iscales 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 workspace_swipe_fingers = 4 } misc { # See https://wiki.hyprland.org/Configuring/Variables/ for more force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers } # Example per-device config # See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more device { name = 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 = suppressevent maximize, class:.* # You'll probably like this. # Wayfarer screen recorder (main window float, and selection utility full screen) windowrulev2 = float, class:^org.stronnag.wayfarer$ windowrulev2 = float, class:^wayfarer$ windowrulev2 = size 100% 100%, class:^wayfarer$ windowrulev2 = move 0 0, class:^wayfarer$ # See https://wiki.hyprland.org/Configuring/Keywords/ for more $mainMod = SUPER # Theme switching binds bind = $mainMod & SHIFT, W, exec, ~/.config/hypr/scripts/switch-theme.sh summer-night bind = $mainMod & SHIFT, X, exec, ~/.config/hypr/scripts/switch-theme.sh summer-day # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, RETURN, exec, $terminal bind = $mainMod, C, killactive, scale bind = ALT, F4, killactive, scale bind = $mainMod, M, exit, bind = $mainMod, E, exec, $fileManager bind = $mainMod, V, togglefloating, bind = $mainMod & SHIFT, G, exec, ~/.config/hypr/scripts/toggle-gaps.sh bind = $mainMod, D, exec, $menu bind = $mainMod SHIFT, D, exec, $run bind = $mainMod, F, fullscreen bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, R, togglesplit, # dwindle bind = $mainMod & ALT, L, exec, hyprlock # Screen Shots bind = CONTROL & SHIFT, Print, exec, gnome-screenshot -i #bind = CONTROL, Print, exec, XDG_CURRENT_DESKTOP=sway flameshot gui bind = CONTROL, Print, exec, grim -g "$(slurp -d)" - | wl-copy # Wofi emoji bind = $mainMod, SPACE, exec, $emoji # 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 # Move focus with mainMod + arrow keys bind = $mainMod, h, movefocus, l bind = $mainMod, l, movefocus, r bind = $mainMod, k, movefocus, u bind = $mainMod, j, movefocus, d # Move window with mainMod + arrow keys bind = $mainMod SHIFT, h, movewindow, l bind = $mainMod SHIFT, l, movewindow, r bind = $mainMod SHIFT, k, movewindow, u bind = $mainMod SHIFT, j, movewindow, d bind = $mainMod SHIFT, left, movewindow, l bind = $mainMod SHIFT, right, movewindow, r bind = $mainMod SHIFT, up, movewindow, u bind = $mainMod SHIFT, down, movewindow, d # Switch workspaces with mainMod + [0-9] bind = $mainMod, ampersand , workspace, 1 bind = $mainMod, eacute , workspace, 2 bind = $mainMod, quotedbl , workspace, 3 bind = $mainMod, apostrophe, workspace, 4 bind = $mainMod, parenleft , workspace, 5 bind = $mainMod, section , workspace, 6 bind = $mainMod, egrave , workspace, 7 bind = $mainMod, exclam , workspace, 8 bind = $mainMod, ccedilla , workspace, 9 bind = $mainMod, agrave , workspace, 10 # Move workspaces with Shift + CTRL + MOD + left/right bind = SHIFT & CTRL & $mainMod, l, movecurrentworkspacetomonitor, r bind = SHIFT & CTRL & $mainMod, right, movecurrentworkspacetomonitor, r bind = SHIFT & CTRL & $mainMod, h, movecurrentworkspacetomonitor, l bind = SHIFT & CTRL & $mainMod, left, movecurrentworkspacetomonitor, l # Switch workspaces with CTRL + ALT + left/right bind = CTRL & ALT, l, workspace, e+1 bind = CTRL & ALT, right, workspace, e+1 bind = CTRL & ALT, h, workspace, e-1 bind = CTRL & ALT, left, workspace, e-1 # Move windows to workspaces with CTRL + ALT + SHIFT + left/right bind = CTRL & ALT & SHIFT, l, movetoworkspace, e+1 bind = CTRL & ALT & SHIFT, right, movetoworkspace, e+1 bind = CTRL & ALT & SHIFT, h, movetoworkspace, e-1 bind = CTRL & ALT & SHIFT, left, movetoworkspace, e-1 # Move active window to a workspace with mainMod + SHIFT + [0-9] bind = $mainMod SHIFT, ampersand , movetoworkspace, 1 bind = $mainMod SHIFT, eacute , movetoworkspace, 2 bind = $mainMod SHIFT, quotedbl , movetoworkspace, 3 bind = $mainMod SHIFT, apostrophe, movetoworkspace, 4 bind = $mainMod SHIFT, parenleft , movetoworkspace, 5 bind = $mainMod SHIFT, section , movetoworkspace, 6 bind = $mainMod SHIFT, egrave , movetoworkspace, 7 bind = $mainMod SHIFT, exclam , movetoworkspace, 8 bind = $mainMod SHIFT, ccedilla , movetoworkspace, 9 bind = $mainMod SHIFT, agrave , movetoworkspace, 10 # 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 bindel = , XF86AudioRaiseVolume, exec, wpctl set-volume --limit 1.0 @DEFAULT_AUDIO_SINK@ 5%+ bindel = , XF86AudioLowerVolume, exec, wpctl set-volume --limit 1.0 @DEFAULT_AUDIO_SINK@ 5%- bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle # Requires playerctl bindl = , XF86AudioPlay, exec, playerctl play-pause bindl = , XF86AudioPrev, exec, playerctl previous bindl = , XF86AudioNext, exec, playerctl next # Submaps, see https://wiki.hyprland.org/Configuring/Binds/#submaps # will switch to a submap called resize bind = ALT, R, submap, resize # will start a submap called "resize" submap = resize # sets repeatable binds for resizing the active window binde = , l, resizeactive, 30 0 binde = , h, resizeactive, -30 0 binde = , k, resizeactive, 0 -30 binde = , j, resizeactive, 0 30 binde = SHIFT, l, resizeactive, 120 0 binde = SHIFT, h, resizeactive, -120 0 binde = SHIFT, k, resizeactive, 0 -120 binde = SHIFT, j, resizeactive, 0 120 # use reset to go back to the global submap bind = , escape, submap, reset bind = ALT, R, submap, reset # will reset the submap, meaning end the current one and return to the global one submap = reset # keybinds further down will be global again... Config File: /home/martijn/.config/hypr/monitors.conf: Read Succeeded monitor = DP-3, 3440x1440, 0x0 , 1 monitor = DP-1, 2560x1440, 3440x-200, 1, transform, 3 monitor = DP-2, disabled workspace = 1, monitor:DP-1 workspace = 2, monitor:DP-1 workspace = 3, monitor:DP-1 workspace = 4, monitor:DP-3 workspace = 5, monitor:DP-3 workspace = 6, monitor:DP-3 workspace = 7, monitor:DP-3 workspace = 8, monitor:DP-3 workspace = 9, monitor:DP-3 ======Config-End======== ```

Description

When teleporting the cursor with SDL3 by calling SDL_WarpMouseInWindow(window, x, y) (which is implemented here), the mouse does warp, but the cursor is still also ghosting in its location before the warp. Note that the window is not constantly submitting frames to the compositor (it's not a game).

I don't know the internals of Hyprland, but it looks like there is a region of the screen not being correctly marked as damaged. So every other frame in the compositors swapchain, you get the old cursor show up.

How to reproduce

Make the mouse teleport more than one tile.

Crash reports, logs, images, videos

Wayfarer_2024-10-17_114022.webm

You can also see how sometimes the cursor is cut in half when it's ghosting. I'm assuming that's across the edge of a tile (where one tile is marked damaged, and the other is not).

vaxerski commented 3 days ago

I assume these are software cursors..?

mcourteaux commented 2 days ago

I assume these are software cursors..?

I don't know for sure. I'm on NVIDIA, and after reviewing my config, I see I forgot the cursor:no_hardware_cursors = true setting.

After adding this line to the config, I still see this glitch happening. So now, yes for sure it happens with software cursors, but it might also happen with hardware cursors (I don't even know if that's possible?).

vaxerski commented 2 days ago

might also happen with hardware cursors (I don't even know if that's possible?).

I'm pretty sure it's not possible thats why I was assuming these arent hw