Skip to content

[SDL3] Incorrect InputQueueCharacter forwarding? #63

Description

@0x0015

Hello,

I seem to be having some trouble getting io.InputQueueCharacters to function as I expect, mainly in that it seems like something may not be being passed to the child context correctly.

I'm not at all knowledgeable about the IME and text handling systems of ImGui, but an easy example that's not working is trying to put https://github.com/BalazsJako/ImGuiColorTextEdit in a node. It internally sets

io.WantCaptureKeyboard = true;
io.WantTextInput = true;

and then reads from io.InputQueueCharacters which seems to work fine normally, but doesn't get any input while in a node (other input such as mouse input, ImGui::IsKeyPressed, etc... does go through though).

My backend is SDL3, so it is likely a biproduct of ocornut/imgui#8584 popping up - in particular following that thread's advice and adding

ImGuiPlatformImeData* ime_data = &ImGui::GetCurrentContext()->PlatformImeData;
ime_data->WantVisible = true;
ime_data->WantTextInput = true;

directly after the io.WantText... line seems to fix it (likely thanks to #60).

Honestly, I'm not sure if this should even be an issue here because it's so specific (to a certain backend, and I wasn't able to find an actual behavior that context_wrapper would need to forward - just a hacky workaround).

I guess I should move off of sdl3...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions