Make window_send_event return window_event_result::deleted if window successfully closed

This will be used to inform the event system in future, in removing calls to window_exists. This applies to if the handler returns a window_event_result::close (which is and should be instead of the handler calling window_close itself, at least in most cases).
This commit is contained in:
Chris Taylor 2016-10-27 16:51:21 +08:00
parent 2d587de8dc
commit 787dbbbf72

View file

@ -129,7 +129,9 @@ public:
{
auto r = wind.w_callback(&wind, event, wind.w_data);
if (r == window_event_result::close)
window_close(&wind);
if (window_close(&wind))
return window_event_result::deleted;
return r;
}