We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5487

Summary: [PATCH] Implement keyboard grab support for Wayland
Product: SDL Reporter: Cameron Gutman <cameron.gutman>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: inexustar
Version: HG 2.0   
Hardware: x86_64   
OS: Linux   
Attachments: Patch

Description Cameron Gutman 2021-01-20 00:28:31 UTC
We can use the zwp_keyboard_shortcuts_inhibit_manager_v1 protocol to support keyboard grab (SDL_HINT_GRAB_KEYBOARD) on Wayland just like we do with XGrabKeyboard() for X11.

This is great for remote desktop and similar applications using SDL on Wayland.
Comment 1 Cameron Gutman 2021-01-20 00:29:50 UTC
Created attachment 4681 [details]
Patch

Tested on GNOME 3.38 on Fedora 33.
Comment 2 Sam Lantinga 2021-01-20 18:20:45 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/b0e13627c656
Comment 3 Cameron Gutman 2021-01-23 01:42:53 UTC
*** Bug 5108 has been marked as a duplicate of this bug. ***