mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-05 17:17:42 +00:00
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:
@@ -1,33 +0,0 @@
|
||||
#include "PopupWindow.hpp"
|
||||
|
||||
static wxWindow *GetTopParent(wxWindow *pWindow)
|
||||
{
|
||||
wxWindow *pWin = pWindow;
|
||||
while (pWin->GetParent()) pWin = pWin->GetParent();
|
||||
return pWin;
|
||||
}
|
||||
|
||||
bool PopupWindow::Create(wxWindow *parent, int style)
|
||||
{
|
||||
if (!wxPopupTransientWindow::Create(parent, style))
|
||||
return false;
|
||||
#ifdef __WXGTK__
|
||||
GetTopParent(parent)->Bind(wxEVT_ACTIVATE, &PopupWindow::topWindowActiavate, this);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
PopupWindow::~PopupWindow()
|
||||
{
|
||||
#ifdef __WXGTK__
|
||||
GetTopParent(this)->Unbind(wxEVT_ACTIVATE, &PopupWindow::topWindowActiavate, this);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __WXGTK__
|
||||
void PopupWindow::topWindowActiavate(wxActivateEvent &event)
|
||||
{
|
||||
event.Skip();
|
||||
if (!event.GetActive() && IsShown()) DismissAndNotify();
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user