-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
SDL Backend: InputText causes underlying child window not receiving any InputQueueCharacters #6306
Comments
Your question is too ambiguous to be answered. We don't know what's behind. It is a Note that we currently only preserve cursor/selection data for one input text, so if your filter is another InputText() that will lose cursor/selection of your main editor. But you seem to be implying you are NOT using InputText() for that filter, which itself is a little surprising. |
To elaborate: My code editor is not an InputText widget of any kind. It is just a child window that processes keystrokes/mouse and draw text. It reads from However, if I enter text in a "real" InputText widget of any kind, I am then unable to do so, as Hope that helps! |
I have the same problem after updating to 1.89, also on an app that watches the input character queue when nothing else has the focus, also using the SDL backend. Imgui 1.89.4 Same symptoms: //io.SetPlatformImeDataFn = ImGui_ImplSDL2_SetPlatformImeData; I know nothing about IME and am not setting |
Just saw @seanpringle's answer as I had another answer. We made changes to that IME support but because no other stock widgets are reading from So it is partly a bug in your custom widget BUT it is also a bug in the backend. (My initial answer, which i am pasting below was assuming your custom widget was misbehaving by not setting nor checking ActiveId. Given the polish of your app I would guess that isn't the case.) |
I have pushed a tentative fix in the form of a7703fe |
@ocornut I can confirm that commenting the I may be misunderstanding something here , but there really is no custom "widget". The workflow here is something like this:
I am highlighting the above process in case I am doing something incredibly stupid. I really do not set or check any ActiveID. The program works fine otherwise. If there is some more esoteric step I am missing, please do let me know. |
I thought your code editor was a custom widget. If you read from If you read those characters, you should be setting However at core this was/is a bug in the SDL backend that I have fixed now. |
SDL2 enables IME input by default (it won't be in SDL3). We ask SDL2 to start/stop IME input when we enter/exit search box. So, after using search, IME input is disabled, but ImGui relies on it always being enabled - it uses it for keyboard input, but it doesn't start/stop IME itself (since [1]; they reenabled that on SDL3 though [2]; issue itself is [3]). We can (and actually could) activate IME even outside of text input. :( Fixes #83 ([ImGui] Text input doesn't work after using song search). [1] ocornut/imgui@a7703fe [2] ocornut/imgui@fab96a6 [3] ocornut/imgui#6306
ImGui version: 1.89.4
Backends: SDL, OpenGL
Hello,
I am making a Code Editor using ImGui . As a final touch, I want to add a search/replace popup with input fields.
The way the text editor works that I create a Child Window that processes, among others, InputQueueCharacters . Everything works OK:
However, when the Search/replace popup appears and I edit the Search text:
When I close the popup, then the underlying child window loses all InputQueueCharacters and I can't type anything.
Is there any way to somehow "activate" InputQueueCharacters again?
The text was updated successfully, but these errors were encountered: