Skip to content

Commit

Permalink
Merge pull request #13346 from xhaggi/fix-window-is-condition
Browse files Browse the repository at this point in the history
[fix] boolean condition window.is does not work properly
  • Loading branch information
xhaggi committed Jan 11, 2018
2 parents f638e40 + 864f3ce commit 3faae1e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions xbmc/GUIInfoManager.cpp
Expand Up @@ -7670,6 +7670,16 @@ bool CGUIInfoManager::GetMultiInfoBool(const GUIInfo &info, int contextWindow, c
if (info.GetData1())
{
CGUIWindow *window = g_windowManager.GetWindow(contextWindow);
if (!window)
{
// try topmost dialog
window = g_windowManager.GetWindow(g_windowManager.GetTopMostModalDialogID());
if (!window)
{
// try active window
window = g_windowManager.GetWindow(g_windowManager.GetActiveWindow());
}
}
bReturn = (window && window->GetID() == static_cast<int>(info.GetData1()));
}
else
Expand Down

0 comments on commit 3faae1e

Please sign in to comment.