FIX: media play state conflict when switch device

Change-Id: I95680159a50b2085cb6de5b7cd612d6b444a6446
This commit is contained in:
chunmao.guo authored and Lane.Wei committed 2022-09-02 12:52:18 +08:00
1 parent 3c8d9be77e
commit 2ecdf43ca1
4 files changed
+38 -23

No files matched your search

+6 -1
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; }