Skip to content

Cannot filter SDL3 events to ImGui #8407

@TheMode

Description

@TheMode

Version/Branch of Dear ImGui:

Branch: master

Back-ends:

imgui_impl_sdl3.cpp + imgui_impl_sdlrenderer3.cpp

Compiler, OS:

Windows 11 + MSCV 2022

Full config/build information:

No response

Details:

I wish to filter events provided to ImGui based on the used mouse/keyboard/gamepad device, which work fine for some inputs, but some others are retrieved globally bypassing event processing: this is the case for mouse motion and gamepads.

This is caused by those global functions: (also present in the GLFW backend)

ImGui_ImplSDL3_UpdateMouseData();
ImGui_ImplSDL3_UpdateMouseCursor();
// Update game controllers (if enabled and available)
ImGui_ImplSDL3_UpdateGamepads();

I would appreciate a way to (perhaps optionally) only rely on processed events whenever possible.

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

It is possible to hover the button without processing any event.

ImGui::Begin("Example Bug");
ImGui::Button("button")
ImGui::End();

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions