mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-10 19:03:30 +00:00
Drag and Drop Target Box does not remain within the Window #3272
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#3272
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version/Branch of Dear ImGui:
Version: 1.76 WIP
Branch: Master and Docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp, imgui_impl_glfw.cpp + imgui_impl_vulkan.cpp, imgui_impl_win32.cpp + imgui_impl_directx11.cpp, Custom
Compiler: MSVC
Operating System: Windows 10
My Issue/Question:
The yellow boxes for drag and drop targets, do not stay within the window they are from. It does not appear to be affected by any chance to the renderer or backend.
Screenshots/Video
Standalone, minimal, complete and verifiable example:
The Demo window works to show this.
Make the Demo window have a width of 93, then use the first drag and drop example with the color edits. That is what was done to get the screen shot.
Last I checked the window elements stay in window. The yellow box does not. Therefor unintended behavior. Note that the yellow box draws on the scrollbar, and the background.
Ah, yes, of course... I thought you were referring to the tooltip window. Too many hours of debugging today :) Removing my comment to avoid confusion.
Turns out that this behavior is enabled on purpose. This is how it looks without explicitly allowing yellow rectangle to go out of bounds:

I have no idea what correct behavior is in this case. We have to wait for a verdict from @ocornut.
Pushed a fix with
4ddb6b46c3This intentional (see initial commit
4b94738c7e) but I frankly can't remember nor understand why I thought it was a good idea back then...Same issue as #4281