SFML community forums
Help => Window => Topic started by: Nexus on June 28, 2011, 06:52:18 pm
-
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?
-
It depends of the system ;) . For exemple my gnome3 only trigger one resize event when I resize a window
-
It depends of the system ;)
One more reason to fix it :P
-
Yep. Don't be afraid to add an issue on the task tracker ;)
-
Done: https://github.com/SFML/SFML/issues/68
I never know if I just overlook something and there is a well-thought intention behind it, so I'm rather conservative with creating new issues... But maybe I shouldn't, as you can easily close them ;)