Skip to content

Commit

Permalink
Merge pull request #55706 from jmb462/fix-bad-control-wrap_mouse-offset
Browse files Browse the repository at this point in the history
Fix bad mouse offset with Control::wrap_mouse()
  • Loading branch information
akien-mga authored Dec 7, 2021
2 parents 46d3840 + 083ff9a commit ff118d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/gui/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2590,7 +2590,7 @@ Control *Control::get_focus_owner() const {

void Control::warp_mouse(const Point2 &p_to_pos) {
ERR_FAIL_COND(!is_inside_tree());
get_viewport()->warp_mouse(get_screen_transform().xform(p_to_pos));
get_viewport()->warp_mouse(get_global_transform().xform(p_to_pos));
}

bool Control::is_text_field() const {
Expand Down

0 comments on commit ff118d7

Please sign in to comment.