From af04d3fb2cf194850554980be6aa9814d747936d Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Sun, 28 May 2023 16:46:16 -0300 Subject: [PATCH] Fix error when attempting to move a embedded window with a negative title height --- scene/main/viewport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 1cc4fbc635d..532b431b06b 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -2837,7 +2837,7 @@ bool Viewport::_sub_windows_forward_input(const Ref &p_event) { title_bar.position.y -= title_height; title_bar.size.y = title_height; - if (title_bar.has_point(mb->get_position())) { + if (title_bar.size.y > 0 && title_bar.has_point(mb->get_position())) { click_on_window = true; int close_h_ofs = sw.window->get_theme_constant(SNAME("close_h_offset"));