mirror of
				https://github.com/ocornut/imgui.git
				synced 2025-10-26 12:27:30 +00:00 
			
		
		
		
	Drag and Drop: Fix drag and drop to tie same-size drop targets by choosen the later one. Fixes dragging into a full-window-sized dockspace inside a zero-padded window. (#3519, #2717)
This commit is contained in:
		| @@ -55,6 +55,8 @@ Breaking Changes: | |||||||
| Other Changes: | Other Changes: | ||||||
|  |  | ||||||
| - Tab Bar: Made it possible to append to an existing tab bar by calling BeginTabBar()/EndTabBar() again. | - Tab Bar: Made it possible to append to an existing tab bar by calling BeginTabBar()/EndTabBar() again. | ||||||
|  | - Drag and Drop: Fix drag and drop to tie same-size drop targets by choosen the later one. Fixes dragging | ||||||
|  |   into a full-window-sized dockspace inside a zero-padded window. (#3519, #2717) [@Black-Cat] | ||||||
| - Backends: OpenGL: use glGetString(GL_VERSION) query instead of glGetIntegerv(GL_MAJOR_VERSION, ...)  | - Backends: OpenGL: use glGetString(GL_VERSION) query instead of glGetIntegerv(GL_MAJOR_VERSION, ...)  | ||||||
|   when the later returns zero (e.g. Desktop GL 2.x). (#3530) [@xndcn] |   when the later returns zero (e.g. Desktop GL 2.x). (#3530) [@xndcn] | ||||||
| - Docs: Split examples/README.txt into docs/BACKENDS.md and docs/EXAMPLES.md improved them. | - Docs: Split examples/README.txt into docs/BACKENDS.md and docs/EXAMPLES.md improved them. | ||||||
|   | |||||||
| @@ -9584,7 +9584,7 @@ const ImGuiPayload* ImGui::AcceptDragDropPayload(const char* type, ImGuiDragDrop | |||||||
|     const bool was_accepted_previously = (g.DragDropAcceptIdPrev == g.DragDropTargetId); |     const bool was_accepted_previously = (g.DragDropAcceptIdPrev == g.DragDropTargetId); | ||||||
|     ImRect r = g.DragDropTargetRect; |     ImRect r = g.DragDropTargetRect; | ||||||
|     float r_surface = r.GetWidth() * r.GetHeight(); |     float r_surface = r.GetWidth() * r.GetHeight(); | ||||||
|     if (r_surface < g.DragDropAcceptIdCurrRectSurface) |     if (r_surface <= g.DragDropAcceptIdCurrRectSurface) | ||||||
|     { |     { | ||||||
|         g.DragDropAcceptFlags = flags; |         g.DragDropAcceptFlags = flags; | ||||||
|         g.DragDropAcceptIdCurr = g.DragDropTargetId; |         g.DragDropAcceptIdCurr = g.DragDropTargetId; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Black Cat!
					Black Cat!