ocornut / imgui

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
MIT License
60.93k stars 10.29k forks source link

Detaching and Dragging a GLFW window from the dockspace to a secondary display causes scaling issues #6465

Open Nick-Fanelli opened 1 year ago

Nick-Fanelli commented 1 year ago

Version: Dear ImGui 1.89.6 WIP (18958) Branch: docking

Back-ends: imgui_impl_glfw + imgui_impl_opengl3 Compiler: clang-1403.0.22.14.1 Operating System: MacOS Ventura 13.1

Detaching and Dragging a GLFW window from the dockspace to a secondary display causes scaling issues

When I drag an ImGui window from the dockspace of the main GLFW window to an external display the window will scale leaving black bars around it. (see pictures below).

However, when I drag the GLFW window over to the same display that the ImGui window is on, the scaling issue immediately disappears.

But, if I drag that ImGui window back over to another display the issue will reoccur.

I assume this has something to do with both of my monitors not being the same aspect ratio. It is also important to keep in mind that I am running this in the Mac operating system which is known to sometimes have issues like this due to the fact that the built-in display on the MacBook is not at a standard 16:9 aspect ratio. My assumption is ImGui is assuming the aspect ratio based on the aspect ratio of the display that the main GLFW window is on. But I figured I would leave it up to the professionals to take a look at


Example of the ImGui Window on the same monitor as the GLFW window... Screenshot of ImGui Window Working

Example of the ImGui Window on a secondary monitor that the GLFW window is not on... Screenshot of ImGui Window Scaled Incorrectly

dgm3333 commented 1 year ago

This looks like it's similar/same as my issue? https://github.com/ocornut/imgui/issues/6444