mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-14 19:04:44 +00:00
Can only add events to current context. #6199
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#6199
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.89.3 WIP (18923)
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: glfw / erhe
Operating System: Windows 10
My Issue/Question:
I am adding file dialog usage into my code. The code that uses the file dialog is like this:
My
select_file()uses WindowsIFileOpenDialogwhich opens a new window on top of my glfw window. This triggers glfw focus callback event, which is happening in context that is something else than the main thread.I am not sure how to deal with the glfw focus event. I would like to call
m_imgui_context->IO.AddFocusEvent(focused != 0)(for my Window ImGui viewport). However, current ImGui does not allow this, if I happen to be using in different ImGui context.I wonder what my options are:
GImGuithread_localmight allow me to have a different ImGui context in the wndproc context?Can only add events to current contextrestriction?I'd really prefer removing the restriction on requiring context to be current in order to be able to send events to it. Any thoughts? Thanks!
We should probably lift that constraint by storing a context pointer in IO. Would also be desirable for #5856
Fixed with
10ace22by @Dragnalith