Skip to content

Conversation

@soarqin
Copy link
Contributor

@soarqin soarqin commented Nov 12, 2025

We should not dispatch mouse/keyboard events to main game/application if these fields are true, as described in imgui.h comments:

bool        WantCaptureMouse;                   // Set when Dear ImGui will use mouse inputs, in this case do not dispatch them to your main game/application (either way, always pass on mouse inputs to imgui). (e.g. unclicked mouse is hovering over an imgui window, widget is active, mouse was clicked over an imgui window, etc.).
bool        WantCaptureKeyboard;                // Set when Dear ImGui will use keyboard inputs, in this case do not dispatch them to your main game/application (either way, always pass keyboard inputs to imgui). (e.g. InputText active, or an imgui window is focused and navigation is enabled, etc.).

This prevents some unintentional inputs to main game while operating on imgui windows.

@soarqin
Copy link
Contributor Author

soarqin commented Nov 12, 2025

This patch seems like to be wrong, xinput games does not use message queue to handle inputs, so it is totally of nonsense

@veeenu
Copy link
Owner

veeenu commented Nov 12, 2025

If you mean to use this in the context of From Software games, unfortunately filtering the messages from the window procedure won't work. I have tried over and over. Even raw input passes through. They have some other mechanism of listening to inputs that bypasses window procedure completely but I never figured out what that is.

@soarqin soarqin closed this Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants