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

[Bug]: Add support for multi-monitor / windowed mode #1253

Open
1 task done
haroldiedema opened this issue Aug 5, 2024 · 1 comment
Open
1 task done

[Bug]: Add support for multi-monitor / windowed mode #1253

haroldiedema opened this issue Aug 5, 2024 · 1 comment

Comments

@haroldiedema
Copy link

haroldiedema commented Aug 5, 2024

What are you trying to do?

Dalamud's drawable elements don't take ImGui.GetMainViewport().WorkPos into account, resulting in the elements staying in the same place on screen while the game's window is being dragged around.

See these two images: The first is the initial position of the unit frame. The second image shows the position of the unit frame after I have dragged the game's window slightly to the right.

image
image

Simply adding the Vector2 returned by ImGui.GetMainViewport().WorkPos to the rendering coordinates of the ImGui draw commands fixes this.

What is the expected behavior?

The elements should stay in-place relative to the window position, rather than the screen.

What actually happened?

All delvui elements are stuck in "monitor screen space", rather than the game's own window.

Suggested solution

Use ImGui.GetMainViewport().WorkPos's result as a coordinate offset to anything that you draw with ImGui.

If you want to have all elements forced on the game window so that they can't break out if multi-monitor support is enabled, use
ImGui.SetNextWindowViewport(ImGui.GetMainViewport().ID) for windows.

Logs

No response

FFXIV Update

  • I have confirmed that I have the latest version of XIVLauncher and DelvUI.
@Tischel
Copy link
Contributor

Tischel commented Aug 7, 2024

None of the suggested solutions seem to work.
I'll have to investigate a bit to fix this.

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