From f0e231eabf5de172cdf30c7405c4ccc79489e3d5 Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Wed, 10 Feb 2010 11:01:38 +0000 Subject: [PATCH] Fixed wrong sf::Event::Resized notification when switching from fullscreen to windowed mode git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1396 4e206d99-4929-0410-ac5d-dfc041789085 --- src/SFML/Window/Window.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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);