Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore losed focus for some pop-up dialogs in visual shader editor #84488

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions editor/plugins/visual_shader_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4081,6 +4081,7 @@ void VisualShaderEditor::_show_members_dialog(bool at_mouse_pos, VisualShaderNod
members_dialog->set_position(graph->get_screen_position() + Point2(5 * EDSCALE, 65 * EDSCALE));
}
members_dialog->popup();
members_dialog->grab_focus();

// Keep dialog within window bounds.
Rect2 window_rect = Rect2(get_window()->get_position(), get_window()->get_size());
Expand Down Expand Up @@ -4110,6 +4111,7 @@ void VisualShaderEditor::_show_add_varying_dialog() {

add_varying_dialog->set_position(graph->get_screen_position() + varying_button->get_position() + Point2(5 * EDSCALE, 65 * EDSCALE));
add_varying_dialog->popup();
add_varying_dialog->grab_focus();

// Keep dialog within window bounds.
Rect2 window_rect = Rect2(DisplayServer::get_singleton()->window_get_position(), DisplayServer::get_singleton()->window_get_size());
Expand All @@ -4121,6 +4123,7 @@ void VisualShaderEditor::_show_add_varying_dialog() {
void VisualShaderEditor::_show_remove_varying_dialog() {
remove_varying_dialog->set_position(graph->get_screen_position() + varying_button->get_position() + Point2(5 * EDSCALE, 65 * EDSCALE));
remove_varying_dialog->popup();
remove_varying_dialog->grab_focus();

// Keep dialog within window bounds.
Rect2 window_rect = Rect2(DisplayServer::get_singleton()->window_get_position(), DisplayServer::get_singleton()->window_get_size());
Expand Down
Loading