From bc30bb4fc059b1b5a6ee2419fb1f495233f50c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E9=9D=92=E5=B1=B1?= Date: Mon, 14 Oct 2024 09:48:58 +0800 Subject: [PATCH] Add `EditorHelpBitTooltip` as a child of `p_target` to avoid jitter Previously the tooltip popup was added as a child of the `p_target`'s viewport (usually the root window), which caused the root window to recalculate the window size, that could cause jitter issues on i3wm if the actual width of the root window was less than `1024`. --- editor/editor_help.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index cfe257fcfc8..adf90840557 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -3868,7 +3868,7 @@ void EditorHelpBitTooltip::show_tooltip(EditorHelpBit *p_help_bit, Control *p_ta EditorHelpBitTooltip *tooltip = memnew(EditorHelpBitTooltip(p_target)); p_help_bit->connect("request_hide", callable_mp(tooltip, &EditorHelpBitTooltip::_safe_queue_free)); tooltip->add_child(p_help_bit); - p_target->get_viewport()->add_child(tooltip); + p_target->add_child(tooltip); p_help_bit->update_content_height(); tooltip->popup_under_cursor(); }