In PIE, FSlateApplication::OnMouseDown cause SButton::OnMouseButtonUp

In PIE, FSlateApplication::OnMouseDown cause SButton::OnMouseButtonUp.

below is detail step :

  1. at PIE, faketouches environment.
  2. mouse down button A (touch/click method is Down and Up)
  3. mouse up button A
  4. mouse down button B, and not mouse up (touch/click method is Down and Up)
  5. you can find button B is clicked although not mouse up yet.

below is why it happens :

When button B is pressed down, you can find FSlateApplication::ProcessReply in call stack.

In that function, “LastWidgetsUnderCursor” is about button A (“WidgetsUnderCursorLastEvent” is added by “FSlateApplication::RoutePointerMoveEvent” when button A pressed down).

So any widget can skip “if(SomeWidgetPreviouslyUnderCursor != RequestedMouseCaptor)”.

So in for loop, finally “SomeWidgetPreviouslyUnderCursor->OnMouseLeave()” called when SomeWidgetPreviouslyUnderCursor is SEditorViewport.

After following call stack, you can find SButton::OnMouseButtonUp is called.

this is my solution :

I think that problem is WidgetsUnderCursorLastEvent always added regardless of dragging mode, but it removed only when dragging mode is true (In “FSlateApplication::RoutePointerUpEvent”, “WidgetsUnderCursorLastEvent.Remove” is called only bIsDragDropping is true).

So just move this line out of parenthesis for it always can called.

if you can find better solution, please tell me.

thanks.

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks