diff --git a/include/SFML/Graphics/RenderTarget.hpp b/include/SFML/Graphics/RenderTarget.hpp index 78172431..582ecd57 100644 --- a/include/SFML/Graphics/RenderTarget.hpp +++ b/include/SFML/Graphics/RenderTarget.hpp @@ -63,7 +63,7 @@ public : /// \param color Fill color to use to clear the render target /// //////////////////////////////////////////////////////////// - void Clear(const Color& color = Color(0, 0, 0)); + void Clear(const Color& color = Color(0, 0, 0, 255)); //////////////////////////////////////////////////////////// /// \brief Draw an object into the target diff --git a/src/SFML/Window/Linux/GlxContext.cpp b/src/SFML/Window/Linux/GlxContext.cpp index 28d24d02..44c72412 100644 --- a/src/SFML/Window/Linux/GlxContext.cpp +++ b/src/SFML/Window/Linux/GlxContext.cpp @@ -62,7 +62,14 @@ myOwnsWindow(true) CreateContext(shared, VideoMode::GetDesktopMode().BitsPerPixel, ContextSettings(0, 0, 0)); // Activate the context - SetActive(true); + if (shared) + SetActive(true); + + // -- Warning -- + // The "if (shared)" condition fixes this bug: + // http://www.sfml-dev.org/forum/viewtopic.php?p=20767#20767 + // However, it was already there before and removed at revision 1236, + // but without any comment... so it might cause other problems in the future } diff --git a/src/SFML/Window/Win32/WglContext.cpp b/src/SFML/Window/Win32/WglContext.cpp index 5f2da071..c5164580 100644 --- a/src/SFML/Window/Win32/WglContext.cpp +++ b/src/SFML/Window/Win32/WglContext.cpp @@ -59,7 +59,14 @@ myOwnsWindow (true) CreateContext(shared, VideoMode::GetDesktopMode().BitsPerPixel, ContextSettings(0, 0, 0)); // Activate the context - SetActive(true); + if (shared) + SetActive(true); + + // -- Warning -- + // The "if (shared)" condition fixes this bug: + // http://www.sfml-dev.org/forum/viewtopic.php?p=20767#20767 + // However, it was already there before and removed at revision 1236, + // but without any comment... so it might cause other problems in the future }