injectMouseButtonDown can report input as handled when clicking on a gui sheet with mouse pass through enabled.

Create issue
Issue #309 resolved
Former user created an issue

Automatic migration. Original reporter: "fedyakin"

If the root window is not active when it is clicked on, the Window::moveToFront_impl will return true, causing the handled count to be 2 on the return from Window::onMouseButtonDown in GUISheet::onMouseButtonDown. The updateMouseEventHandled function decrements the handled count by one if mouse pass through is enabled. This results in a handled count of one, and reporting that the input was used.

It seems like updateMouseEventHandled should set e.handled to 0, not decrement it.

Reproducibility: always

Comments (2)

  1. Paul Turner

    Thanks for the bug report.

    It seems like updateMouseEventHandled should set e.handled to 0, not decrement it.

    The issue there of course is that the count could also be >1 if for instance a user-assigned event handler returned true.

    Overriding the moveToFront_impl at GUISheet to always return false in the case of (!d_parent && d_mousePassThroughEnabled) should do the trick I think.

  2. Log in to comment