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

Docking markers rendered at wrong location when attempting to move viewports outside of monitor boundaries #7664

Open
VitalyVint opened this issue Jun 5, 2024 · 1 comment

Comments

@VitalyVint
Copy link

VitalyVint commented Jun 5, 2024

Hello, i got strange results with docking examples,
maybe something wrong with my setup, i am not sure.
Maybe someone could advise me where start to dig to fix this...
Or maybe i miss stable docking version?

Version/Branch of Dear ImGui:

Branch: docking, last commit fdc084f

Back-ends:

imgui_impl_vulkan.cpp + imgui_impl_glfw.cpp

Compiler, OS:

os: linux + X11,
compiler: gcc (Gentoo 13.2.1_p20240210 p14) 13.2.1 20240210
vulkan version 1.3.280, vkinfo.txt
glfw-3.4

Full config/build information:

build default example (need glfw-3.4 sources) with this CMakeLists.txt

project(test-imgui)

set (imgui imgui-docking)

find_package(Vulkan REQUIRED)
add_subdirectory(glfw-3.4)
add_executable(test-imgui
	${imgui}/imgui.cpp
	${imgui}/imgui_demo.cpp
	${imgui}/imgui_draw.cpp
	${imgui}/imgui_tables.cpp
	${imgui}/imgui_widgets.cpp

	${imgui}/backends/imgui_impl_vulkan.cpp
	${imgui}/backends/imgui_impl_glfw.cpp 
        
	${imgui}/examples/example_glfw_vulkan/main.cpp
)

target_link_libraries(test-imgui glfw Vulcan)
target_include_directories(test-imgui PRIVATE ${imgui} ${imgui}/backends)

Details:

Enable docking, try to move window, docking markers move with window.
Sometimes sub windows lost focus and become hidden behind main window.

Screenshots/Video:

video
video.mp4

Minimal, Complete and Verifiable Example code:

examples/example_glfw_vulkan/main.cpp from repo used
build with cmake --build . --config Debug

@ocornut
Copy link
Owner

ocornut commented Jun 6, 2024

This is a by product of original #2117 issue with multi-viewports, they are programmed with the expectation that window manager honor requested position, and don’t handle it well when it doesn’t. In your case, dear imgui thinks the window is being moved down, but the window manager prevents that from happening, and our docking markers are drawn given expected position of the window. Aside from the markers, the inputs would be broken.

I am expecting to fix that now i have access to a MacOS device exhibiting similar issue.

@ocornut ocornut changed the title docking markers misplaced Docking markers rendered at wrong location when attempting to move viewports outside of monitor boundaries Jun 6, 2024
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