Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Mac: problem with Event (CMD-W)  (Read 1436 times)

0 Members and 1 Guest are viewing this topic.

Rekkusu

  • Newbie
  • *
  • Posts: 1
    • View Profile
Mac: problem with Event (CMD-W)
« 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.

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Mac: problem with Event (CMD-W)
« Reply #1 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.
Want to play movies in your SFML application? Check out sfeMovie!

 

anything