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

The mouse coordinates are shifted when you drag the window to the right or lower-right corner of the screen #6934

Closed
houchr opened this issue Oct 17, 2023 · 2 comments

Comments

@houchr
Copy link

houchr commented Oct 17, 2023

Version/Branch of Dear ImGui:

Version: v1.89.x
Branch: docking

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_sdl3.cpp + imgui_impl_opengl3.cpp or imgui_impl_sdl2.cpp + imgui_impl_opengl3.cpp or imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler: gcc
Operating System: debian/ubuntu 22.04 and kylin desktop v10 sp1

My Issue/Question:

The mouse coordinates are shifted(offset) when you drag the window to the right edge or bottom-right corner of the screen。as the figure shows,the blue arrow is the actual position of the mouse, and the orange arrow is the mouse position it responds to, with a big deviation. When I try to move the window, as long as it moves successfully, the mouse no longer shifts(offset).

The shifted(offset) mouse causes incorrect operation, this problem also occurs when using the imgui demo。

Screenshots/Video

bf4175ea7b0b1c7196d18865ad814f9

Standalone, minimal, complete and verifiable example:

// Here's some code anyone can copy and paste to reproduce your issue
this problem also occurs when using the imgui demo。
please use imgui demo, open a window, and drag it to right edge or bottom-right coner of screen。
@houchr
Copy link
Author

houchr commented Oct 17, 2023

By the way, the window shouldn't be too small.

The windows platform (win10 win11) does not have this problem.

@ocornut
Copy link
Owner

ocornut commented Oct 17, 2023

Same question same answer as #6904
Disable multi-viewports on Linux or Wayland for now.

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

No branches or pull requests

2 participants