-
-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No mouse lock while in a match in Dota 2 #5900
Comments
Can you try to bind the fullscreen dispatcher to some key and press it twice on the game's window? That might be a workaround it. |
You mean these? tried them with no effect. |
Try with fullscreen,0 |
That did not fix it. To give more info, the Dota 2 cursor stays and the window manager still treats as if the mouse is in the game so despite my mouse being in other monitors and windows, they are not interactable. In the version where this isnt an issue, I have the issue with windows sometimes not focusing correctly, like not being able to type in the window I am interacting with and the input getting stuck in other window. There were some open issues about them (cant find them right now), but they are fixed on the git package but this issue now comes up. Maybe thats a hint? |
I now confirm that it happens on the latest release System/Version infoHyprland, built from branch at commit cba1ade848feac44b2eda677503900639581c3f4 (props: bump version to 0.40.0).
Date: Sat May 4 15:42:32 2024
Tag: v0.40.0, commits: 4606
flags: (if any)
System Information:
System name: Linux
Node name: archlinux
Release: 6.8.9-arch1-2
Version: #1 SMP PREEMPT_DYNAMIC Tue, 07 May 2024 21:35:54 +0000
GPU information:
28:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (rev c0) (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: |
Since this in release now, I did the simple workaround of putting my monitor position far out from my other monitors so that this thing cannot happen at all. Naturally this is kinda handicapped solution since I can not move to other monitors with my mouse (only through keybinds) while this setting is on. so for example
I hope this helps anyone who wants to play Dota properly using Hyprland right now. |
Note, this is a regression, perhaps included with the backend rewrite, but could be anything. |
I can confirm this happens on -git and 0.40.0. System/Version infoHyprland, built from branch main at commit 3fd6c1b30e5397432c4640286efaf52a6891f71c (layout: fix centering of new floating windows).
Date: Mon Jun 3 18:46:20 2024
Tag: v0.40.0-151-g3fd6c1b3, commits: 4757
flags: (if any)
System Information:
System name: Linux
Node name: arch
Release: 6.9.3-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Fri, 31 May 2024 15:14:45 +0000
GPU information:
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 32 [Radeon RX 7700 XT / 7800 XT] [1002:747e] (rev c8) (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:
split-monitor-workspaces by Duckonaut ver 1.1.0
======Config-Start======
Config File: /home/mrk/.config/hypr/hyprland.conf: Read Succeeded
source = ~/.config/hypr/keybinds.conf
source = ~/.config/hypr/window_rules.conf
source = ~/.config/hypr/autostart.conf
debug {
disable_logs = false
}
env = XCURSOR_SIZE,24
env = WLR_DRM_NO_ATOMIC,1
env = QT_QPA_PLATFORM,wayland;xcb
monitor=HDMI-A-2, 1920x1080, 0x300, 1
monitor=HDMI-A-1, 1920x1080, 3840x300, 1
monitor=DP-2, 1920x1080@144, 1920x0, 1
input {
kb_layout = us
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
mouse_refocus = false
accel_profile = flat
sensitivity = 0
}
misc {
mouse_move_enables_dpms = true
key_press_enables_dpms = true
enable_swallow = true
swallow_regex = ^(kitty)$
}
master {
new_is_master = true
new_on_top = true
orientation = left
no_gaps_when_only = 0
}
cursor {
# inactive_timeout = 60 # seconds
}
general {
gaps_in = 5
# cursor_inactive_timeout = 60 # seconds
gaps_out = 10
border_size = 2
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
layout = master
allow_tearing = true
}
decoration {
rounding = 5
drop_shadow = false
shadow_range = 3
shadow_render_power = 5
blur {
enabled = false
size = 1
passes = 2
}
}
# plugin {
# hyprexpo {
# columns = 3
# gap_size = 5
# bg_col = rgba(33ccffee)
# workspace_method = first 1
#
# enable_gesture = false
# gesture_distance = 300
# gesture_positive = false
# }
# }
plugin {
hyprbars {
# example config
bar_height = 30
# example buttons (R -> L)
# hyprbars-button = color, size, on-click
hyprbars-button = rgb(ff4040), 10, , hyprctl dispatch killactive
hyprbars-button = rgb(eeee11), 10, , hyprctl dispatch fullscreen 1
}
}
animations {
enabled = yes
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, 3, default, slidefade
}
Config File: /home/mrk/.config/hypr/keybinds.conf: Read Succeeded
$mainMod = SUPER
$left_mon = HDMI-A-2
$middle_mon = DP-2
$right_mon = HDMI-A-1
bind = $mainMod, G, exec, rofi -show combi -modes "combi,drun,run" -combi-modes "drun,run"
bind = $mainMod, W, exec, hyprwindow
bind = SUPERSHIFT, P, exec, powermenu
# bind = SUPER, grave, hyprexpo:expo, toggle
bind = $mainMod, X, focusmonitor, $left_mon
bind = $mainMod, C, focusmonitor, $middle_mon
bind = $mainMod, D, focusmonitor, $right_mon
bind = $mainMod, comma, focusmonitor, $left_mon
bind = $mainMod, period, focusmonitor, $middle_mon
bind = $mainMod, slash, focusmonitor, $right_mon
bind = SUPERSHIFT, X, movewindow, mon:$left_mon
bind = SUPERSHIFT, C, movewindow, mon:$middle_mon
bind = SUPERSHIFT, D, movewindow, mon:$right_mon
bind = SUPERSHIFT, comma, movewindow, $left_mon
bind = SUPERSHIFT, period, movewindow, $middle_mon
bind = SUPERSHIFT, slash, movewindow, $right_mon
bind = $mainMod, M, fullscreen,1
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, RETURN, exec, kitty
bind = $mainMod, Q, killactive,
# bind = $mainMod, M, exit,
bind = $mainMod, E, exec, dolphin
bind = $mainMod, T, togglefloating,
bind = $mainMod, F, fullscreen,
bind = $mainMod, R, exec, rofi -show drun
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
# 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
bind = SUPERSHIFT, l, movewindow, r
bind = SUPERSHIFT, h, movewindow, l
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, split-workspace, 1
bind = $mainMod, 2, split-workspace, 2
bind = $mainMod, 3, split-workspace, 3
bind = $mainMod, 4, split-workspace, 4
bind = $mainMod, 5, split-workspace, 5
bind = $mainMod, 6, split-workspace, 6
bind = $mainMod, 7, split-workspace, 7
bind = $mainMod, 8, split-workspace, 8
bind = $mainMod, 9, split-workspace, 9
bind = $mainMod, 0, split-workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, split-movetoworkspace, 1
bind = $mainMod SHIFT, 2, split-movetoworkspace, 2
bind = $mainMod SHIFT, 3, split-movetoworkspace, 3
bind = $mainMod SHIFT, 4, split-movetoworkspace, 4
bind = $mainMod SHIFT, 5, split-movetoworkspace, 5
bind = $mainMod SHIFT, 6, split-movetoworkspace, 6
bind = $mainMod SHIFT, 7, split-movetoworkspace, 7
bind = $mainMod SHIFT, 8, split-movetoworkspace, 8
bind = $mainMod SHIFT, 9, split-movetoworkspace, 9
bind = $mainMod SHIFT, 0, split-movetoworkspace, 10
bind = $mainMod, right, focusmonitor, +1
bind = $mainMod, left, focusmonitor, -1
# Focus
bind = $mainMod, backslash, focuswindow, discord
bind = $mainMod SHIFT, S, exec, hyprshot --target=clipboard --source=area --mode=screenshot
bind = $mainMod SHIFT, R, exec, hyprshot --mode=record
bindel=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindel=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
bind = ,mouse:276,pass,discord
Config File: /home/mrk/.config/hypr/window_rules.conf: Read Succeeded
# Workspace rules
# workspace=1, gapsout:0, rounding:0, default:true
workspace=21, gapsout:0, rounding:0
windowrulev2 = noborder, onworkspace:w[t1]
# Games
windowrulev2 = immediate, class:^(dota2)$
windowrulev2 = immediate, class:^steam_app.*
windowrulev2 = immediate, initialTitle:Godot
windowrulev2 = fullscreen, class:^(dota2)$
windowrulev2 = noanim, class:^(dota2)$
windowrulev2 = noanim, class:^steam_app.*
# Steam itself
windowrulev2 = workspace 5 silent, class:(steam), title:(Steam)$
windowrulev2 = workspace 11 silent, class:(steam), title:(Friends List)
windowrulev2 = tile, class:(steam), title:(Friends List)
# Discord
windowrulev2 = workspace 11 silent, class:discord
# Teams
windowrulev2 = workspace 22 silent, class:^(Microsoft Teams - Preview)$
windowrulev2 = idleinhibit always, class:^(Microsoft Teams - Preview)$
# Vivaldi
windowrulev2 = tile, class:^(Vivaldi.*)$, title: ^(Vivaldi - Vivaldi)$
windowrulev2 = tile, class:^(Vivaldi.*)$, title: ^(.*teams.microsoft.com.*)$
# Pavucontrol
windowrulev2 = float, class:pavucontrol
windowrulev2 = size 1024 768, class:pavucontrol
windowrulev2 = center, class:pavucontrol
# hide xwaylandvideobridge
windowrulev2 = opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$
windowrulev2 = noanim,class:^(xwaylandvideobridge)$
windowrulev2 = nofocus,class:^(xwaylandvideobridge)$
windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$
# Rofi
layerrule = noanim, rofi
# 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
# windowrulev2 = center,class:^(jetbrains-.*)$,floating:1
# windowrulev2 = noborder,class:^(jetbrains-.*)$,floating:1
# windowrulev2 = size 60 60,class:^(jetbrains-.*)$,floating:1
#! Disable window flicker when autocomplete or tooltips appear
windowrulev2 = noinitialfocus,class:^(jetbrains-.*)$,title:^(win.*)$,floating:1
Config File: /home/mrk/.config/hypr/autostart.conf: Read Succeeded
exec-once = hyprpm reload -n
exec-once = hyprctl setcursor Vanilla-DMZ 24
exec-once = lxsession
exec-once = mpd
exec-once = gammastep-indicator
exec-once = gammastep
# exec-once = waybar
exec-once = ags
# exec-once=hyprpaper
exec-once = dunst
exec-once = waypaper --restore
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = ~/.config/hypr/socket_listener
exec-once = firefox
exec-once = ydotoold
exec-once = hypridle
======Config-End======== |
So I found myself with a bit of time and did a proper bisect of this regression. The first bad commit is 25aec3a The issue is pretty easy to reproduce: just enter demo mode with a hero and see that the cursor is not locked to the window. Its been sitting here for quite a while, could you look at it @vaxerski pretty please? I can help with testing or whatever. |
I have many bugs to fix man, feel free to tinker yourself. You can also add an offset to your monitor so that you have a gap in layout, that will prevent the mouse from leaving the monitor |
All fine, thanks for your awesome work. I will try to tinker a bit, but I know next to nothing about cpp/wayland so slim chances of success. If anybody else is willing to try, please do. |
The current release version of Hyprland seems to bring more problems with Dota. I now have problems with my alt hotkeys whenever I switch workspaces (in this case monitors, see above) via hotkeys. The alt presses arent registering properly. I can fix it if I "switch" to the same workspace again which the game is in, while being there. That usually fixes it. |
This seems to be fixed now with #6627. I can confirm that mouse locks properly in dota 2 for me now. |
Yep, its working for me as well |
Hyprland Version
System/Version info
Bug or Regression?
Bug
Description
In the AUR package of hyprland (as opposed to the current package in Arch (0.39.1-5) introduces an issue in Dota 2.
While in a match, the mouse is supposed to be locked in to the game window and moving the cursor to the edge should not move the cursor outside the game. This works as expected in the version 0.39.1-5, but in the git package, the mouse moves out of bounds and the Dota 2 mouse icon also stays.
My setup is 3 monitors and the Dota 2 is in the middle screen.
How to reproduce
Launch Dota 2. Start a match with bots, pick a hero, spawn and try to move the mouse out out of the game.
Crash reports, logs, images, videos
No response
The text was updated successfully, but these errors were encountered: