FIX: Revert "[STUDIO-2186] hide PopupWindow on alt-tab"

This reverts commit 3b8c11659a6cf3062ad27772348b84be5001a4f6.

Reason for revert: update pick

Change-Id: Id991af5b4a5950ee76ecf59176eabc72c885db88
This commit is contained in:
战马 2023-02-15 12:03:38 +08:00 committed by Lane.Wei
parent 5c61c834b0
commit 5f69f4c016
23 changed files with 70 additions and 139 deletions

View file

@ -5,7 +5,7 @@
wxDEFINE_EVENT(EVT_DISMISS, wxCommandEvent);
BEGIN_EVENT_TABLE(DropDown, PopupWindow)
BEGIN_EVENT_TABLE(DropDown, wxPopupTransientWindow)
EVT_LEFT_DOWN(DropDown::mouseDown)
EVT_LEFT_UP(DropDown::mouseReleased)
@ -50,7 +50,7 @@ DropDown::DropDown(wxWindow * parent,
void DropDown::Create(wxWindow * parent,
long style)
{
PopupWindow::Create(parent, wxPU_CONTAINS_CONTROLS);
wxPopupTransientWindow::Create(parent, wxPU_CONTAINS_CONTROLS);
SetBackgroundStyle(wxBG_STYLE_PAINT);
SetBackgroundColour(*wxWHITE);
state_handler.attach({&border_color, &text_color, &selector_border_color, &selector_background_color});
@ -62,7 +62,7 @@ void DropDown::Create(wxWindow * parent,
// BBS set default font
SetFont(Label::Body_14);
#ifdef __WXOSX__
// PopupWindow releases mouse on idle, which may cause various problems,
// wxPopupTransientWindow releases mouse on idle, which may cause various problems,
// such as losting mouse move, and dismissing soon on first LEFT_DOWN event.
Bind(wxEVT_IDLE, [] (wxIdleEvent & evt) {});
#endif