From 1cd0a34e470ca7d7e53261cf090e4a787154ba44 Mon Sep 17 00:00:00 2001 From: Tetane Date: Mon, 3 Jul 2023 20:17:56 +0200 Subject: [PATCH] Fix Create shader Node window position on second monitor --- editor/plugins/visual_shader_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index c9651e634f7..2cf9e523674 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -3995,7 +3995,7 @@ void VisualShaderEditor::_show_members_dialog(bool at_mouse_pos, VisualShaderNod members_dialog->popup(); // Keep dialog within window bounds. - Rect2 window_rect = Rect2(DisplayServer::get_singleton()->window_get_position(), DisplayServer::get_singleton()->window_get_size()); + Rect2 window_rect = Rect2(get_window()->get_position(), get_window()->get_size()); Rect2 dialog_rect = Rect2(members_dialog->get_position(), members_dialog->get_size()); Vector2 difference = (dialog_rect.get_end() - window_rect.get_end()).max(Vector2()); members_dialog->set_position(members_dialog->get_position() - difference);