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

Viewport: docking drop rectangles appear in wrong location because of wrong extrapolation of OS' HoveredViewport #2360

Closed
r-lyeh opened this issue Feb 18, 2019 · 8 comments

Comments

@r-lyeh
Copy link

r-lyeh commented Feb 18, 2019

1.68+docking branch+multi-viewport

  1. create some floating windows.
  2. maximize some non-imgui window so it overlaps all imgui windows.
  3. drag a imgui window across the window and notice the issue: current focused imgui window interacts with blurred imgui windows and renders blue regions with clipping.

image

@ocornut
Copy link
Owner

ocornut commented Feb 18, 2019

Hello,
I don't understand the explanation/repro here.

@r-lyeh
Copy link
Author

r-lyeh commented Feb 19, 2019

Lol me neither :D

@r-lyeh
Copy link
Author

r-lyeh commented Feb 19, 2019

So, just create a few floating tabs around the screen, then maximize a non-imgui windows, then pick a random imgui tab and start dragging it around the non-imgui window. You will see rendering artifacts with obvious clipping because the imgui window you are dragging cares and knows about all the other imgui windows, which are blurred/hidden at the time of dragging.

@ocornut
Copy link
Owner

ocornut commented Feb 19, 2019

Could you make a gif while having Metrics>Internal panel visible?
Also mention the backends and platform.

@r-lyeh
Copy link
Author

r-lyeh commented Feb 19, 2019

Sure thing. Here you have it. GLFW3 + GL3. Win10.

gif

@ocornut
Copy link
Owner

ocornut commented Feb 19, 2019

OK I understand it now.

Cannot solve this without the back-end providing the io.MouseHoveredViewport info honoring transparent-input windows. GLFW_HOVERED was introduced in GLFW master (aiming for GLFW 3.3) but unfortunately as it stands the full information we need is not available in GLFW. Right now, GLFW_HOVERED will always see the window we are dragging.

I requested support for transparent-inputs window here: glfw/glfw#1236
And it is listed in: https://github.com/ocornut/imgui/wiki/Help-Wanted

Unfortunately without more resource on Linux/Mac front and users/devs support this is not going to make it to GFLW. If you have access and experience with those OS, helping solving those tasks/issues would be of tremendous help. I was hoping by the time GLFW 3.3 is out it would have everything necessary to fully support multi-viewports.

@r-lyeh
Copy link
Author

r-lyeh commented Feb 19, 2019

Ah, pity. GLFW issue solving is super slow (nothing wrong with that btw), so I also guess the feature not going to make it for 3.3 (or anytime soon). I'd help if I could, but I only have win experience :s

@ocornut ocornut changed the title Bug: repainting blue drop regions when no other window is focused Viewport: docking drop rectangles appear in wrong location because of wrong extrapolation of OS' HoveredViewport Feb 19, 2019
@ocornut
Copy link
Owner

ocornut commented May 27, 2021

FYI this was merged in GLFW in July 2020 (glfw/glfw#1236)

This feature has been added as GLFW_MOUSE_PASSTHROUGH with glfw/glfw#1568 by @rokups and will be included in 3.4.

GLFW 3.4 is not out yet but grabbing from master works, and imgui_impl_glfw already supports it.
I'll close this as it is out of our realm now.

@ocornut ocornut closed this as completed May 27, 2021
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