nowrep / obs-vkcapture

OBS Linux Vulkan/OpenGL game capture
GNU General Public License v2.0
530 stars 25 forks source link

Cursor is almost always present #230

Open zastrixarundell opened 2 weeks ago

zastrixarundell commented 2 weeks ago

Describe the bug Considering you have multiple monitors, when a game is normally run and you open an game-menu and move to another monitor, the cursor will be shown on the last registered location. It will not disappear until you hover back.

Also in gamescope the cursor is basically always shown for me.

Screenshots or video

Gamescope:

gamescope

Gamescope gameplay will have the cursor almost a always shown, even when the game is focused and the cursor is hidden by the game.

obs-vkcapture and monitor capture side-by side: [ obs-vkcapture ][ pipewire ]

https://github.com/user-attachments/assets/edd2f238-e56f-4d5b-b2ea-80dde93b3ac0

System (please complete the following information):

nowrep commented 2 weeks ago

I think there's nothing to do because that's how XWayland works. It only has one "display" so if you move cursor outside the XWayland application it will stay on the border.

But maybe the positions directly on the border can be filtered out and cursor hidden in this case.

zastrixarundell commented 2 weeks ago

Yeah, the cursor being hidden sound good. Maybe we can do something like this:

if  cursor_hidden_on_system 
    return hide cursor

if cursor_movement_diff > 1 and vkcapture_movement_diff == 0
    return hide_cursor

I'm not sure either how XWayland work but considering it's not showing on games which run on XWayland, I hope a solution is available.

Honestly I don't care that much about the cursor being shown when the window is unfocused, it's mostly an issue when it'll shown even if it's focused.