| Summary: | Implement SDL_SetWindowGrab for Wayland | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Tudor <me> |
| Component: | video | Assignee: | Tudor <me> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus |
| Version: | HG 2.1 | Keywords: | target-2.0.14 |
| Hardware: | All | ||
| OS: | Linux | ||
| Attachments: |
SDL_SetWindowGrab.patch - attempt #1
SDL_SetWindowGrab.patch - attempt #2 |
||
|
Description
Tudor
2020-04-16 17:38:03 UTC
Sure, if you want to provide a patch, that would be great. Thanks! Created attachment 4309 [details]
SDL_SetWindowGrab.patch - attempt #1
Alright, I've put together a first attempt at a patch and confirmed it matches X11 single-confine behaviour (to the best of my knowledge) with a small test program. It's largely based off the existing locked pointer support.
I'm not sure what the behaviour should be if the user requests another confine while one is currently active. Currently, I've made it a no-op.
Hi, just wanted to bump this in case it slipped under the radar. Any feedback on the patch would be much appreciated so that I may make any requested changes :) Sorry, forgot to mention in my earlier comment that I've been running this patch locally with a game that requires it, and I haven't noticed any wrong behavior since then.(In reply to Sam Lantinga from comment #1) It generally looks good. New window grabs should replace older ones. Can you update your patch with that change? Tentatively marking this as target-2.0.14, since this patch seems pretty close. Created attachment 4338 [details]
SDL_SetWindowGrab.patch - attempt #2
Sounds good, I've uploaded a patch that destroys the old confine when creating a new one.
Patch added, thanks! https://hg.libsdl.org/SDL/rev/4709c1dfeabb |