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
Multi-monitor setups and "mouselock" or "cursorlock" #463
Comments
It's a complicated issue and related to window managers themselves. I have had issues with mouse screen/window locking before but recent kwin/kde updates have resolved it for the most part. Also be sure winecfg has capture mouse enabled. You need to play around with a few settings until you find what works for you. Sometimes you can fix the issue by running the game in a Virtual Window etc.. |
I'm not sure if DXVK actually has to deal with locking the mouse, and if so, under which circumstances. I would expect applications to do that when needed, and winecfg already provides a toggle for it. |
Are you using Wayland by any chance? I had similar issues until I reverted back to Xorg. Edit: Using dual monitors myself just FYI. And all is working just fine. |
You didn't say if you tested these games without dxvk. A lot of games are prone to this kind of issues by design, regardless if it is windows or linux. |
The windows10 creators content update actually broke cursor-lock for background mouse (menu cursor in game) for many games and also in general for a select few (ie fallout4). I resolved this under Windows10 by using a program called cursor lock believe it or not, you need to lock it to interior of a program window for it to work so its a bit fiddly (other settings didn't work). This application may work under wine as a last resort. PS. I think MS fixed the cursor locking issue with a update. But it was there with windows 1803. |
@jarrard i'll check this app, but dont think any chance that it can work in wine |
I have same problem. Linux Antergos 4.17.5-1-ARCH #1 SMP PREEMPT Sun Jul 8 17:27:31 UTC 2018 x86_64 GNU/Linux Tested DE: MATE, Cinnamon, KDE, Xfce, Gnome, Deepin. |
@maximt hmm this rly strange. i cant confirm this - have same problem with and without dxvk. wine-3.10 Unity 7. |
I'm still not convinced that dxvk needs to handle this. DXGI does not grab the mouse by default for fullscreen windows, this is the game's responsibility. |
No issues for me with MATE (Marco WM) 2x 2560x1440 screens, mouse captures nicely when i get back into the games. its probably a WM/configuration issue somewhere edit: most games you bring up the menu with escape key to release the mouse and go into the other monitor, then coming back and closing the escape menu and its locked in nicely again. there are few games where escape menu doesnt unlock the mouse, in this case you alt+tab or switch workspace with keyboard shortcuts to leave the application and then when you return to it, it locks nicely again. can anyone point a game where it doesnt lock correctly? i have played lots of games and never seen this happen. |
As far as using the winecfg setting to capture the mouse, that always captures the mouse. Usually you want the mouse to be free during menus and certain things, and then to become locked again during 1st or 3rd person gameplay. Enabling this means you cant click around in the menus. I don't really know who the responsibility would fall on, but I decided to report it here since mouse capture works fine under vanilla wine, but if I use DXVK it seems to have an issue. |
Someone would have to figure out why this works on wined3d but not on DXVK, and under which circumstances exactly this problem appears. I'm not doing anything input-related, so I'm not sure why this happens, and I haven't managed to reproduce this locally yet with any of my games. Still not sure if this is really my bug because, as mentioned, DXVK should not affect input management in any way at all. |
for me this problem happens with and without dxvk. offtop: |
I would need some help by someone who knows their way around low-level WIn32 window management to fix this. For now I'm treating this as a DXVK bug since people are reporting many input-related issues lately that don't seem to happen with wined3d. There's literally nothing I can do about it since I lack the knowledge. |
Maybe switch back to SDL ;-) |
does this happen when your screens have different resolutions? just a random thought as i have both 2560x1440, maybe thatswhy i haven't seen this issue. also is there some free or super cheap game that has that issue so i can try if i have it also |
https://www.uninformativ.de/git/xpointerbarrier/file/README.html you guys may want to use this program on problematic games + multi-monitor combo. It makes sure the cursor stays in single monitor. The techniques wine uses to prevent this is not good enough, because it's poll based, pointer barriers reside in X server thus making sure pointer never escapes the monitor. |
@Cloudef, thanks, the cursor is locked in area, but it's useless for FPS games, mouse lookaround dont work, it's stuck on window's border. |
I'd recommend anyone having strange mouse issues to retest with wine-staging 3.15 as it seems to have a fix for it. |
Short feedback on this specifically for Fallout4: Wine-staging 3.18 on Gentoo
|
@jan-lugfl good to know, thx! |
I believe this is an issue with DXVK and some unexpected behavior. DXVK has worked great so far in the few games I have tested. If you have a third person or first person game, usually the mouse cursor will be "locked" to the center of the screen and hidden, until you switch applications and then its automatically shown and unlocked. In single monitor mode this does not matter, as if you move your hidden cursor around, you don't notice. If you have more than one monitor, and a game in fullscreen on one monitor, you can see your mouse move onto the second monitor. This should not happen. Your mouse should stay fixed onto the application.
In some games and vanilla wine, In multimonitor mode, my mouse is not locked in place, but it also cannot leave the application window that is in fullscreen.
Sorry I don't have any logs or anything, I think this is just something that has not been implemented yet.
Here are some unrelated links describing "mouselock" or variants of:
https://www.chromium.org/developers/design-documents/mouse-lock
https://docs.unity3d.com/ScriptReference/Screen-lockCursor.html
The text was updated successfully, but these errors were encountered: