Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -475,7 +475,7 @@ void SetFocusedWindow(Window *w)
|
||||
_focused_window = w;
|
||||
|
||||
/* So we can inform it that it lost focus */
|
||||
if (old_focused != nullptr) old_focused->OnFocusLost();
|
||||
if (old_focused != nullptr) old_focused->OnFocusLost(false);
|
||||
if (_focused_window != nullptr) _focused_window->OnFocus();
|
||||
}
|
||||
|
||||
@@ -551,7 +551,7 @@ void Window::OnFocus()
|
||||
/**
|
||||
* Called when window loses focus
|
||||
*/
|
||||
void Window::OnFocusLost()
|
||||
void Window::OnFocusLost(bool closing)
|
||||
{
|
||||
if (this->nested_focus != nullptr && this->nested_focus->type == WWT_EDITBOX) VideoDriver::GetInstance()->EditBoxLostFocus();
|
||||
}
|
||||
@@ -1136,7 +1136,7 @@ void Window::Close()
|
||||
|
||||
/* Make sure we don't try to access this window as the focused window when it doesn't exist anymore. */
|
||||
if (_focused_window == this) {
|
||||
this->OnFocusLost();
|
||||
this->OnFocusLost(true);
|
||||
_focused_window = nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user