| Summary: | X11 SDL_SetWindowBordered doesn't return if window is hidden | ||
|---|---|---|---|
| Product: | SDL | Reporter: | James Legg <jlegg> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | jwyatt |
| Version: | 2.0.5 | Keywords: | target-2.0.6 |
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: | Quick patch that covers most cases | ||
|
Description
James Legg
2014-03-12 09:45:03 UTC
Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry if you got a lot of email from this. This is to help me sort through some bugs in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4, though! This also seems to cause sporadic hangs when using Ubuntu Unity. Is SDL waiting for the correct event in XIfEvent, in X11_SetWindowBordered (line 867-ish)? SetWindowBordered either calls XChangeProperty, which generates a PropertyNotify event, or XSetTransientForHint, which doesn't seem to generate any events. Switching to checking for PropertyNotify events instead of ConfigureNotify events seems to cure these hangs. Created attachment 2127 [details]
Quick patch that covers most cases
Hey Ryan, is this a good change for 2.0.6? (In reply to Sam Lantinga from comment #4) > Hey Ryan, is this a good change for 2.0.6? I think the goal with the ConfigureNotify check was to wait until the Window Manager had definitely made a change to the window (and it happens to often work because most WMs moves the client window a little to accommodate the border change...? But that isn't required). I'm not sure the PropertyNotify event, acknowledging the change, actually means the border of the window has actually gotten around to changing on the WM's end of things, but maybe this just isn't something we can check directly. In which case, maybe just XFlush() and don't wait at all? (tl;dr: it couldn't hurt to apply this patch, but we might move from waiting forever to not waiting long enough.) --ryan. Sigh, it turns out we already had this problem and I removed the ConfigureNotify check outright in 2015. I miss my memory some days. https://hg.libsdl.org/SDL/rev/bbb6d1f2a849 (That was Bug #3052.) So this _should_ also be resolved for hidden windows. Resolving bug; if this is still causing problems, though, feel free to reopen! --ryan. |