Only set focus if the left button was pressed for consistency with just about
everything else. Also, just skip the event instead of setting the focus
explicitly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72632
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
return;
}
- // set the focus to ourself if any of the mouse buttons are pressed
- if(event.ButtonDown() && !HasFocus())
- SetFocus();
+ if(event.LeftDown())
+ {
+ // Not skipping this event would prevent the system from setting focus
+ // to this window.
+ event.Skip();
+ }
int x = event.GetX();
int y = event.GetY();