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:
parent
2d587de8dc
commit
787dbbbf72
|
@ -129,7 +129,9 @@ public:
|
||||||
{
|
{
|
||||||
auto r = wind.w_callback(&wind, event, wind.w_data);
|
auto r = wind.w_callback(&wind, event, wind.w_data);
|
||||||
if (r == window_event_result::close)
|
if (r == window_event_result::close)
|
||||||
window_close(&wind);
|
if (window_close(&wind))
|
||||||
|
return window_event_result::deleted;
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue