# HG changeset patch # User teknolog # Date 1270297995 -3600 # Node ID 4d1286f7f982f1a4249be31e8fc322217b8579b8 # Parent 520291e284607b4b31c554854b8d23f7508ed647 Fix for bug 2114 - Podcatcher wont close from the "open apps" menu diff -r 520291e28460 -r 4d1286f7f982 application/group/Podcast.mmp --- a/application/group/Podcast.mmp Sat Apr 03 12:02:32 2010 +0100 +++ b/application/group/Podcast.mmp Sat Apr 03 13:33:15 2010 +0100 @@ -114,4 +114,5 @@ LIBRARY ws32.lib LIBRARY hlplch.lib LIBRARY bitgdi.lib +LIBRARY apgrfx.lib diff -r 520291e28460 -r 4d1286f7f982 application/src/PodcastAppui.cpp --- a/application/src/PodcastAppui.cpp Sat Apr 03 12:02:32 2010 +0100 +++ b/application/src/PodcastAppui.cpp Sat Apr 03 13:33:15 2010 +0100 @@ -29,7 +29,7 @@ #include "debug.h" #include "..\help\podcatcher.hlp.hrh" #include "PodcastApp.h" - +#include #include #include @@ -127,9 +127,30 @@ } case EEikCmdExit: { - TApaTask task(iEikonEnv->WsSession()); - task.SetWgId(iEikonEnv->RootWin().Identifier()); - task.SendToBackground(); + // we want to prevent red button from closing podcatcher, and + // instead we send it to background + // however, we want to respect the task manager (fast swap) close + // command, so we check if task manager is the focussed window group + + RWsSession& ws = iEikonEnv->WsSession(); + TInt wgid = ws.GetFocusWindowGroup(); + CApaWindowGroupName* gn = CApaWindowGroupName::NewLC(ws, wgid); + TUid activeAppUid = gn->AppUid(); + CleanupStack::PopAndDestroy(gn); + + const TUid KUidFastSwap = { 0x10207218 }; + if (activeAppUid == KUidFastSwap) + { + // closed by task manager + Exit(); + } + else + { + // red button pressed + TApaTask task(iEikonEnv->WsSession()); + task.SetWgId(iEikonEnv->RootWin().Identifier()); + task.SendToBackground(); + } break; } case EPodcastHelp: