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 5507

Summary: [PATCH] Window resizing fails when keyboard is grabbed on GNOME X11
Product: SDL Reporter: Cameron Gutman <cameron.gutman>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: x86_64   
OS: Linux   
Attachments: Patch

Description Cameron Gutman 2021-01-28 01:48:20 UTC
GNOME Mutter on X11 requires keyboard grab for certain important functionality like window resizing, interaction with the application context menu, and opening the Activites view. To allow Mutter to grab the keyboard as needed, we'll ungrab when the mouse leaves our window.

This problem has been there since initial support for keyboard grab in X11, but it wasn't reachable previously because mouse grab prevented those controls from actually being accessible (since the mouse couldn't move outside the window to reach them).

Some investigation done by the VirtualBox is here: https://www.virtualbox.org/ticket/10842#comment:3

The approach I'm taking here matches what VirtualBox ultimately decided to do: https://github.com/mdaniel/virtualbox-org-svn-vbox-trunk/blob/7661adb1ab02277f10f861bfbe03a81b78612aad/src/VBox/RDP/client-1.8.4/xwin.c#L2525
Comment 1 Cameron Gutman 2021-01-28 01:49:06 UTC
Created attachment 4723 [details]
Patch
Comment 2 Sam Lantinga 2021-01-28 02:44:50 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/aa47564b5861