Skip to content

Commit

Permalink
Revert "Fix that the focus-out notification got sent deferred"
Browse files Browse the repository at this point in the history
This reverts commit 8cdab04.

Fixes #78589.
  • Loading branch information
akien-mga committed Jun 23, 2023
1 parent f44b2d7 commit 68193be
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions scene/main/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1624,15 +1624,7 @@ void Window::popup(const Rect2i &p_screen_rect) {
// Send a focus-out notification when opening a Window Manager Popup.
SceneTree *scene_tree = get_tree();
if (scene_tree) {
List<Node *> list;
scene_tree->get_nodes_in_group("_viewports", &list);
for (Node *n : list) {
Window *w = Object::cast_to<Window>(n);
if (w && !w->get_embedder() && w->has_focus()) {
w->_event_callback(DisplayServer::WINDOW_EVENT_FOCUS_OUT);
break;
}
}
scene_tree->notify_group_flags(SceneTree::GROUP_CALL_DEFERRED, "_viewports", NOTIFICATION_WM_WINDOW_FOCUS_OUT);
}
}

Expand Down

0 comments on commit 68193be

Please sign in to comment.