Merge pull request #77588 from YeldhamDev/window_title_move_fix

Fix error when attempting to move a embedded window with a negative title height
This commit is contained in:
Yuri Sizov 2023-05-29 17:06:50 +02:00 committed by GitHub
commit 11f84ed36f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2837,7 +2837,7 @@ bool Viewport::_sub_windows_forward_input(const Ref<InputEvent> &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"));