Merge pull request #85418 from bruvzg/fix_crash_on_late_enterexit
Fix crash on late mouse enter/exit event arrival.
This commit is contained in:
commit
a807d4bfa7
1 changed files with 6 additions and 0 deletions
|
@ -681,6 +681,9 @@ void Window::_propagate_window_notification(Node *p_node, int p_notification) {
|
||||||
void Window::_event_callback(DisplayServer::WindowEvent p_event) {
|
void Window::_event_callback(DisplayServer::WindowEvent p_event) {
|
||||||
switch (p_event) {
|
switch (p_event) {
|
||||||
case DisplayServer::WINDOW_EVENT_MOUSE_ENTER: {
|
case DisplayServer::WINDOW_EVENT_MOUSE_ENTER: {
|
||||||
|
if (!is_inside_tree()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Window *root = get_tree()->get_root();
|
Window *root = get_tree()->get_root();
|
||||||
if (root->gui.windowmanager_window_over) {
|
if (root->gui.windowmanager_window_over) {
|
||||||
#ifdef DEV_ENABLED
|
#ifdef DEV_ENABLED
|
||||||
|
@ -696,6 +699,9 @@ void Window::_event_callback(DisplayServer::WindowEvent p_event) {
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case DisplayServer::WINDOW_EVENT_MOUSE_EXIT: {
|
case DisplayServer::WINDOW_EVENT_MOUSE_EXIT: {
|
||||||
|
if (!is_inside_tree()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Window *root = get_tree()->get_root();
|
Window *root = get_tree()->get_root();
|
||||||
if (!root->gui.windowmanager_window_over) {
|
if (!root->gui.windowmanager_window_over) {
|
||||||
#ifdef DEV_ENABLED
|
#ifdef DEV_ENABLED
|
||||||
|
|
Loading…
Reference in a new issue