Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ViewPanner panning-mouse-warp doesn't work in SubViewports or embedded Windows #100438

Closed
Sauermann opened this issue Dec 15, 2024 · 0 comments · Fixed by #100444
Closed

ViewPanner panning-mouse-warp doesn't work in SubViewports or embedded Windows #100438

Sauermann opened this issue Dec 15, 2024 · 0 comments · Fixed by #100444
Assignees
Milestone

Comments

@Sauermann
Copy link
Contributor

Tested versions

  • reproducible in v4.0.stable.official [92bee43] and v4.4.dev.custom_build [b9437c3]

System information

Debian Linux X11

Issue description

Using a GraphEdit in a SubViewport or in an embedded Window has currently the problem, that panning doesn't work, when moving the mouse out of the GraphEdit area. In that case, the mouse cursor jumps in unexpected ways:

  • In a SubViewport, this leads the mouse to be shifted by the distance from the top-left corner of the root window to the top-left corner of the SubViewportContainer.
  • In an embedded Window, this leads the mouse to be constantly jumping around.

I would expect, that the mouse reappears on the other side of the GraphEdit area without lateral movement.

BugViewPannerMouseWarp.mp4

I have tracked this to:

pan_callback.call(Input::get_singleton()->warp_mouse_motion(mm, p_canvas_rect), p_event);

Input::get_singleton()->warp_mouse_motion assumes, that its argument are in root-viewport coordinates, which they are not.

Steps to reproduce

  1. Load and run MRP
  2. Try panning with the middle mouse button as shown in the video above

Minimal reproduction project (MRP)

viewpanner-in-subviewport.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant