FIX: media play state conflict when switch device

Change-Id: I95680159a50b2085cb6de5b7cd612d6b444a6446
This commit is contained in:
chunmao.guo 2022-08-26 09:39:45 +08:00 committed by Lane.Wei
parent 3c8d9be77e
commit 2ecdf43ca1
4 changed files with 38 additions and 23 deletions

View file

@ -122,6 +122,8 @@ bool Button::Enable(bool enable)
return result;
}
void Button::SetCanFocus(bool canFocus) { this->canFocus = canFocus; }
void Button::Rescale()
{
if (this->active_icon.bmp().IsOk())
@ -230,7 +232,8 @@ void Button::mouseDown(wxMouseEvent& event)
{
event.Skip();
pressedDown = true;
SetFocus();
if (canFocus)
SetFocus();
CaptureMouse();
}
@ -286,3 +289,5 @@ WXLRESULT Button::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
}
#endif
bool Button::AcceptsFocus() const { return canFocus; }