Hyprland
Hyprland copied to clipboard
Switching window with keybinds doesn't lock the cursor correctly
Hyprland Version
System/Version info
Hyprland, built from branch main at commit f4f3aa2e505ca1b22688fb4a32f31c4bfb851dd0 dirty (layout: add size prediction for initial xdg commits).
Date: Wed Feb 28 11:45:43 2024
Tag: v0.36.0-2-gf4f3aa2e
flags: (if any)
System Information:
System name: Linux
Node name: Arc
Release: 6.7.6-zen1-1-zen
Version: #1 ZEN SMP PREEMPT_DYNAMIC Fri, 23 Feb 2024 16:32:48 +0000
GPU information:
08:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] [10de:1c03] (rev a1) (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:
Bug or Regression?
Bug
Description
Mainly noticeable when playing a game, I've found that if I use my keybind of SUPER + arrow key to switch focus to my game window, the cursor does not get locked. This means that looking around in game will cause my cursor to leave the window boundaries, unfocusing it and causing the game to pause or stop receiving input.
How to reproduce
- Set a keybind for switching window focus (I'm using SUPER + arrow keys)
- Open a game (in my case I'm using Minecraft, I haven't had the chance to test if any other games have the same issue)
- Focus a different window (Discord, browser whatever)
- Use the keybind to refocus the game
- Attempt to move the camera using the mouse
I have tried to record a video showcasing the issue but it may not be super clear due to my bad OBS setup
Crash reports, logs, images, videos
https://github.com/hyprwm/Hyprland/assets/65602967/8649abec-c0cb-492d-840c-982de41af727
Just to update, it seems this only occurs when switching from a window on a different workspace, in the video I'm switching from Discord on my second monitor.
please check #4889
I tried to reproduce this after #4889 with different games and its working correctly for me
I'm still experiencing the same issues
https://github.com/hyprwm/Hyprland/assets/65602967/20f1de98-1476-4bea-b3cb-901e8866078a
Here's another video with only one cursor this time (weird obs issue), it doesn't actually seem to be based on anything, just happens randomly and I can't figure out why.
I can also confirm that this doesn't happen on sway, did a bit of testing and it seems to be kind of based on how fast i move my cursor? I honestly have no idea, but it's kind of made most games unplayable for me at the moment :c
After a recent update this is happening much less frequently so games are at least playable now, though it still happens sometimes, still unsure why.
I have the same problem still on 0.41.0. Once the cursor leaves the window (either to switch to another workspace or my 2nd display on the left of my main monitor), it doesn't relock again, breaking constraints until I restart the game.
It doesn't really matter what game it is. I tested Deep Rock Galactic, X4: Foundations and Fallout New Vegas.
In DRG's case, I can press escape and then switch to another workspace and back to get it working again. Sadly this trick doesn't work on both X4 and FNV.
This is an XWayland issue and was resolved by using my system installation of GLFW to run the game.
closing then