Groogy/rbSFML — Issue #30: Event::Closed does not equal Event::Closed
Author: silentdth
Created: 2012-03-06 20:15:16+00:00
State: open

Take the below code for example, if you close the window using the red 'X' (Windows 7 32bit) the event described with 'puts event' is 'Event::Closed', but the window does not close:

# The main loop - ends as soon as the window is closed
while window.open?
# Event processing
window.each_event do |event|
puts event
if event === Event::Closed
window.close
end
end

# OpenGL drawing commands go here...

# End the current frame and display its contents on screen
window.display
end