Skip to content

ImGui::IsItemHovered() and mouse clicks #1013

@Flix01

Description

@Flix01

In one of my projects I have a very strange behaviour: when I keep the left or the middle mouse button pressed, ImGui::IsItemHovered() becomes false (even if I'm on the item). Right clicks don't seem to be affected by this issue, and it always happens regardless the ImGui back-end (glfw3 or SDL2).

Basically I want to process LMB and MMB clicks when the user is on an item, and I can't, because when the mouse is down, ImGui::IsItemHovered() becomes false.

I know, it's probably just something wrong in my code, and to have better answers I should attach some code to replicate the issue, but can anybody guess what's happening ?

P.S. I know that I could use ImGui::IsMouseHoveredRect() to make it work, and it works this way, but then I'm afraid it will trigger even on windows that are covered by the active one...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions