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 5491 - [PATCH] Implement MinimizeWindow for Wayland
Summary: [PATCH] Implement MinimizeWindow for Wayland
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-22 03:55 UTC by Cameron Gutman
Modified: 2021-01-22 06:40 UTC (History)
0 users

See Also:


Attachments
Patch (6.86 KB, patch)
2021-01-22 03:57 UTC, Cameron Gutman
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron Gutman 2021-01-22 03:55:54 UTC
Wayland has xdg_toplevel_set_minimized()/zxdg_toplevel_v6_set_minimized() which pretty much does what it says on the tin, so we can implement MinimizeWindow() with that.

The only real gotchas are:
- there's no API to programmatically un-minimize a window
- we need to manually re-enter fullscreen mode after the window is un-minimized by the user
Comment 1 Cameron Gutman 2021-01-22 03:57:08 UTC
Created attachment 4684 [details]
Patch

Tested on GNOME 3.38.3 and KDE Plasma 5.20.5
Comment 2 Sam Lantinga 2021-01-22 06:40:07 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/d5eb94fe3daf