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

Moving windows in the client application doesn't work properly when using Sample Dual UI in mirror mode. #61

Open
arnaud-jamin opened this issue Jan 5, 2025 · 2 comments

Comments

@arnaud-jamin
Copy link

arnaud-jamin commented Jan 5, 2025

Describe the bug
When trying to move a window in the client application when using Sample Dual UI in mirror mode, the window teleport to a fixed location.

To Reproduce

  1. Launch the sample in SampleDualUI
  2. launch the server
  3. connect to the server
  4. Choose Mirror UI
  5. Move a window on the server: it works
  6. Move a window on the client: it gets teleported

Expected behavior
The window on the client should not teleport to a fixed location, but should follow the mouse

Screenshots
image

Additional context
This is because the last mouse pos received on the client is given to imgui on a new frame, even if this mouse position is not relevant anymore:

io.AddMousePosEvent(pCmdInput->mMousePos[0], pCmdInput->mMousePos[1]);

Callstack:

ProcessInputData
NewFrame
@sammyfreg
Copy link
Owner

On mirror mode, the client input/display properties (size/dpi) are completly ignored, it only shows the content controlled by the server and sent to it. I did notice the window jump once, which I will investigate, but you should not expect to be able to move/control content on the client in this particular mode. This mode is not that useful, just a showcasing that it is possible to see locally what's being rendered on the server.

@arnaud-jamin
Copy link
Author

Ok thanks!

Very nice work by the way.

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

No branches or pull requests

2 participants