diff --git a/src/SFML/Window/Window.cpp b/src/SFML/Window/Window.cpp index cfaae84c..7ea1963b 100644 --- a/src/SFML/Window/Window.cpp +++ b/src/SFML/Window/Window.cpp @@ -445,6 +445,10 @@ void Window::Initialize(priv::WindowImpl* Window) myWindow = Window; myWindow->Initialize(); + // Clear the event queue + while (!myEvents.empty()) + myEvents.pop(); + // Listen to events from the new window myWindow->AddListener(this); myWindow->AddListener(&myInput);