Skip to content

Modernize input handling#343

Open
lapinozz wants to merge 2 commits intoSFML:masterfrom
lapinozz:inputs
Open

Modernize input handling#343
lapinozz wants to merge 2 commits intoSFML:masterfrom
lapinozz:inputs

Conversation

@lapinozz
Copy link
Copy Markdown
Contributor

@lapinozz lapinozz commented Apr 20, 2026

Updated the input handling to fix some bugs and to make it more similar to imgui's own backends (mostly looked at the SDL one)

  • Use events for touch instead of saving the state and setting it every frame
  • Pass events to imgui even if we are not in focus, if we receive the events we should pass them
  • Use SFML's function to show the virtual keyboard instead of manually managing it for Android

Fixes #337, #338 and #88

@lapinozz
Copy link
Copy Markdown
Contributor Author

lapinozz commented Apr 22, 2026

After reading previous issues and PRs it seems like the main drawback of using events only for mouse inputs instead of doing global polling is that we might not receive events if there's a transparent window/overlay on top of ours.

IMO that seems like an edge case and the workaround for that is easier/cleaner than the ones for the current issues

see #261 and #227

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.

First-ever click into unfocused window causes mouse drag from {0,0} ImGui WantCaptureMouse incorrect on unfocused window

1 participant