From 73bf3e8f1b7f4d1bf5c6729f9cf79756295bc84a Mon Sep 17 00:00:00 2001 From: upstream svn Date: Sun, 27 Dec 2020 15:21:13 +0000 Subject: [PATCH] Fix 'minimized' behavior Fixes https://github.com/amule-project/amule/issues/54 --- .svn-revision | 2 +- src/MuleTrayIcon.cpp | 2 ++ src/amuleDlg.cpp | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.svn-revision b/.svn-revision index 8b9b32d9..356118b7 100644 --- a/.svn-revision +++ b/.svn-revision @@ -1 +1 @@ -11069 +11070 diff --git a/src/MuleTrayIcon.cpp b/src/MuleTrayIcon.cpp index 759b7050..848d5e13 100644 --- a/src/MuleTrayIcon.cpp +++ b/src/MuleTrayIcon.cpp @@ -149,6 +149,7 @@ void CMuleTrayIcon::ServerConnection(wxCommandEvent& WXUNUSED(event)) void CMuleTrayIcon::ShowHide(wxCommandEvent& WXUNUSED(event)) { theApp->amuledlg->Iconize(theApp->amuledlg->IsShown()); + theApp->amuledlg->Show(!theApp->amuledlg->IsShown()); } @@ -522,5 +523,6 @@ wxMenu* CMuleTrayIcon::CreatePopupMenu() void CMuleTrayIcon::SwitchShow(wxTaskBarIconEvent&) { theApp->amuledlg->Iconize(theApp->amuledlg->IsShown()); + theApp->amuledlg->Show(!theApp->amuledlg->IsShown()); } // File_checked_for_headers diff --git a/src/amuleDlg.cpp b/src/amuleDlg.cpp index ee2913df..79638fab 100644 --- a/src/amuleDlg.cpp +++ b/src/amuleDlg.cpp @@ -38,6 +38,7 @@ #include #include #include // Needed for wxWindowUpdateLocker +#include // Needed for wxFindWindowAtPoint #include @@ -1042,7 +1043,7 @@ void CamuleDlg::OnMinimize(wxIconizeEvent& evt) { // Evil Hack: check if the mouse is inside the window #ifndef __WINDOWS__ - if (GetScreenRect().Contains(wxGetMousePosition())) + if (wxFindWindowAtPoint(wxGetMousePosition())) #endif { if (m_prefsDialog && m_prefsDialog->IsShown()) { -- 2.11.4.GIT