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 5198 - SDL_WINDOWEVENT_FOCUS_GAINED event on hidden x11 windows [patch]
Summary: SDL_WINDOWEVENT_FOCUS_GAINED event on hidden x11 windows [patch]
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: 2.0.12
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-17 14:06 UTC by James Legg
Modified: 2020-06-17 17:04 UTC (History)
0 users

See Also:


Attachments
patch (1.59 KB, text/plain)
2020-06-17 14:06 UTC, James Legg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Legg 2020-06-17 14:06:53 UTC
Created attachment 4387 [details]
patch

When a window with keyboard focus is hidden is hidden with SDL_HideWindow, after the expected events (SDL_WINDOWEVENT_HIDDEN and SDL_WINDOWEVENT_FOCUS_LOST), I'm receiving a SDL_WINDOWEVENT_FOCUS_GAINED window event for the hidden window. I'm using gnome-shell with XWayland and SDL's X11 backend. The attached patch fixes the issue for me.
Comment 1 Sam Lantinga 2020-06-17 17:04:43 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/dd215b7d208b