From 787dbbbf72ac8a5c1cad204dc0467fd6c11aa47d Mon Sep 17 00:00:00 2001 From: Chris Taylor Date: Thu, 27 Oct 2016 16:51:21 +0800 Subject: [PATCH] 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). --- common/include/window.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/include/window.h b/common/include/window.h index 7c297c0ac..131ee02ee 100644 --- a/common/include/window.h +++ b/common/include/window.h @@ -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; }