summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorjmb462 <jmb462@gmail.com>2021-08-31 17:43:35 +0200
committerRĂ©mi Verschelde <rverschelde@gmail.com>2021-12-06 14:29:48 +0100
commit81efebb3a170dd6194905599361c38ae4246c434 (patch)
tree0dc5df12b8df69c2272836bfbb66bbb30037a709 /scene/main
parentede7614fe2e088f9ece1e1aba5cb3d5fceb476e4 (diff)
Fix bad popups offset in editor with single window off
Co-authored-by: Gil Arasa Verge <gilarasaverge@gmail.com> Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/viewport.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 007e5d1173..af4032a77d 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1183,7 +1183,7 @@ void Viewport::_gui_show_tooltip() {
Control *tooltip_owner = nullptr;
String tooltip_text = _gui_get_tooltip(
gui.tooltip_control,
- gui.tooltip_control->get_global_transform().xform_inv(gui.last_mouse_pos),
+ gui.tooltip_control->get_screen_transform().xform_inv(gui.last_mouse_pos),
&tooltip_owner);
tooltip_text = tooltip_text.strip_edges();
if (tooltip_text.is_empty()) {
@@ -1712,7 +1712,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
if (gui.tooltip_popup) {
if (gui.tooltip_control) {
- String tooltip = _gui_get_tooltip(over, gui.tooltip_control->get_global_transform().xform_inv(mpos));
+ String tooltip = _gui_get_tooltip(over, gui.tooltip_control->get_screen_transform().xform_inv(mpos));
if (tooltip.length() == 0) {
_gui_cancel_tooltip();