Clear _focused_window in window destructor before calling OnFocuLost
This is such that EditBoxInGlobalFocus does not return true within any OnFocusLost handlers
This commit is contained in:
@@ -1092,8 +1092,8 @@ Window::~Window()
|
|||||||
|
|
||||||
/* Make sure we don't try to access this window as the focused window when it doesn't exist anymore. */
|
/* Make sure we don't try to access this window as the focused window when it doesn't exist anymore. */
|
||||||
if (_focused_window == this) {
|
if (_focused_window == this) {
|
||||||
this->OnFocusLost(nullptr);
|
|
||||||
_focused_window = nullptr;
|
_focused_window = nullptr;
|
||||||
|
this->OnFocusLost(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->DeleteChildWindows();
|
this->DeleteChildWindows();
|
||||||
|
Reference in New Issue
Block a user