Skip to content

Commit

Permalink
Merge pull request #1032 from vktr/feature/fix-restore-window-bug
Browse files Browse the repository at this point in the history
Only call Restore if IsIconized
  • Loading branch information
vktr committed Nov 23, 2020
2 parents 688721e + a6f1c18 commit cfe927b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/picotorrent/ipc/applicationoptionsconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ bool ApplicationOptionsConnection::OnExecute(const wxString&, const void *data,
}

m_frame->MSWGetTaskBarButton()->Show();
m_frame->Restore();

if (m_frame->IsIconized())
{
m_frame->Restore();
}

m_frame->Raise();
m_frame->Show();
m_frame->HandleParams(j["files"], j["magnet_links"]);
Expand Down
7 changes: 6 additions & 1 deletion src/picotorrent/ui/mainframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,12 @@ void MainFrame::OnIconize(wxIconizeEvent& ev)
void MainFrame::OnTaskBarLeftDown(wxTaskBarIconEvent&)
{
this->MSWGetTaskBarButton()->Show();
this->Restore();

if (this->IsIconized())
{
this->Restore();
}

this->Raise();
this->Show();
this->SendSizeEvent();
Expand Down

0 comments on commit cfe927b

Please sign in to comment.