SFML community forums

Help => General => Topic started by: Rekkusu on March 31, 2010, 12:56:10 pm

Title: Mac: problem with Event (CMD-W)
Post by: Rekkusu on March 31, 2010, 12:56:10 pm
Using the default xcode template, my SFML app crashes if I try to quit it with the CMD-W shortcut. The problem is that this DOES close the app, but it doesn't return the correct sf::Event. It returns sf::Event::LostFocus instead of sf::Event::Closed.
Since the app only checks for Event::Closed, the app never properly closes. It's obviously easy to check for LostFocus event as well, but that would cause my app to close when a user just deselects the window.
Title: Mac: problem with Event (CMD-W)
Post by: Ceylo on April 02, 2010, 03:02:22 pm
Could you post a minimal example reproducing the problem ?

I may indeed have made a mistake with the events, however the app should never crash because of this.