Commit graph

14 commits

Author SHA1 Message Date
Sam Lantinga
f1886b3c36 Fixed bug 1526 - X11 - XUnmapWindow should not be called directly
driedfruit

In X11_HideWindow, we call XUnmapWindow to unmap. According to ICCCN2.0, this should never happen, and XWithdrawWindow should be called instead.

http://www.tronche.com/gui/x/icccm/sec-4.html#s-4.1.4

"The reason for requiring the client to send a synthetic UnmapNotify event is to ensure that the window manager gets some notification of the client's desire to change state, ***even though the window may already be unmapped when the desire is expressed***."

Additionally, this can be observed at http://cgit.freedesktop.org/xorg/lib/libX11/tree/src/Withdraw.c#n65

Failure to comply leads to "MapNotify" event never appearing on non-reparenting WMs after subsequent show-hide-show requests. (I'm currently observing this behavior, thus my bug report).
2013-07-27 00:49:34 -07:00
Sam Lantinga
0cb6385637 File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
Ryan C. Gordon
4f438b70a2 Make SDL_SetError and friends unconditionally return -1.
This lets us change things like this...

    if (Failed) {
        SDL_SetError("We failed");
        return -1;
    }

...into this...

    if (Failed) {
        return SDL_SetError("We failed");
    }


 Fixes Bugzilla #1778.
2013-03-31 12:48:50 -04:00
Sam Lantinga
95dcfa4c28 Happy New Year! 2013-02-15 08:47:44 -08:00
Michael Sartain
079d0ee977 Add defines to disable setlocale and fork. Disable that code by default for now. 2013-02-05 12:10:54 -08:00
Ryan C. Gordon
d41de59fc9 Cleaned out a few C++ single-line comments.
Should we bother doing this anymore? Is there really a C compiler we care
 about that doesn't support this?
2013-01-21 02:50:11 -05:00
Ryan C. Gordon
c2ec53f4fa X11 messageboxes should treat "\r\n" as "\n" by ignoring the '\r' char.
--HG--
extra : rebase_source : 0054e96755f753555237f3d7dd64f1dfa1a1e56c
2012-12-16 14:39:49 -05:00
Ryan C. Gordon
de32627287 Fork a child process for X11 message boxes, so setlocale() doesn't break stuff. 2012-12-08 15:33:14 -05:00
Sam Lantinga
f584f9e554 astyle to the rescue! 2012-12-07 20:28:52 -08:00
Ryan C. Gordon
f34e7b4ce0 X11 msgbox: try to protect the existing setlocale() state. 2012-12-07 23:26:28 -05:00
Ryan C. Gordon
2c1f08ae4b X11 message boxes should work with UTF-8 strings if possible. 2012-12-07 20:00:42 -05:00
Sam Lantinga
57f18e2fc2 Use the correct variable for the button spacing (even though they end up being the same thing) 2012-10-30 12:21:15 -07:00
Sam Lantinga
a7b4572eb2 Fixed tab spacing 2012-10-23 17:40:19 -07:00
Sam Lantinga
227bb9413f Added API for simple messagebox, courtesy of Mike Sartain 2012-10-23 17:11:22 -07:00