Hello, I work with Visual Studio 2010 and SFML 2 revision 175cdd... I have the following code:
#include <SFML/Window.hpp>
#include <iostream>
int main()
{
sf::Window window(sf::VideoMode(400, 300), "Resize test");
for (;;)
{
sf::Event event;
while (window.PollEvent(event))
{
if (event.Type == sf::Event::Resized)
std::cout << "Resize: w=" << event.Size.Width << ", h=" << event.Size.Height << std::endl;
else if (event.Type == sf::Event::KeyPressed)
return 0;
}
window.Display();
}
}
Two issues:
- When I minimize the window and maximize it again, a Resize event is triggered.
- When I draw the edges to resize the window manually, many Resize events are generated, although one would be enough.
Is this behavior intended? If so, why?