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 3231

Summary: SDL_MinimizeWindow do not work on Linux
Product: SDL Reporter: Imants <capsexe>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED ABANDONED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus, philipp.wiesemann
Version: 2.0.4   
Hardware: x86_64   
OS: Linux   

Description Imants 2016-01-10 10:32:25 UTC
I am trying to call SDL_MinimizeWindow but it seams to not work on Linux but is working on Windows.

Example:

window = SDL_CreateWindow( "test", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_SHOWN );
SDL_MinimizeWindow(window);

int pass;
if (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED)
  pass = 1;
else
  pass = 0;

if (!pass)
  return 0; //program exits
Comment 1 Philipp Wiesemann 2016-01-10 15:45:15 UTC
Is this on Mir, Wayland or X11?
Comment 2 Imants 2016-01-10 15:52:52 UTC
SDL_GetCurrentVideoDriver() returns "x11" so it must be it.
Comment 3 Philipp Wiesemann 2016-01-10 16:28:25 UTC
The example works with SDL_PumpEvents() after SDL_MinimizeWindow().
Comment 4 Ryan C. Gordon 2016-01-12 10:11:18 UTC
Yeah, on X11, we have to wait for the system to tell us it's minimized ("unmapped," specifically).

Sam: should we maybe try to block until this event arrives? I'm not sure if window managers can decline to unmap, etc, though.

--ryan.
Comment 5 Ryan C. Gordon 2018-08-06 21:20:21 UTC
Hello, and sorry if you're getting dozens of copies of this message by email.

We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc.

Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report.

So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues.

(please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!)

Thanks,
--ryan.