Permalink
Browse files

[rendering] fixed reverted ff1b212 and fix it proper fixed #13434 , #…

…13419 and 13435. Thx cptspiff.

Link to the deadlock : http://xbmclogs.com/show.php?id=11365
  • Loading branch information...
1 parent 93b9549 commit 2f7c13fb0b28db179e45f0c860535793a63297c7 @huceke committed Oct 26, 2012
Showing with 8 additions and 11 deletions.
  1. +0 −2 xbmc/guilib/GUIWindowManager.cpp
  2. +8 −9 xbmc/windows/GUIWindowHome.cpp
@@ -428,8 +428,6 @@ void CGUIWindowManager::ActivateWindow_Internal(int iWindowID, const vector<CStd
// Send the init message
CGUIMessage msg(GUI_MSG_WINDOW_INIT, 0, 0, currentWindow, iWindowID);
msg.SetStringParams(params);
- // TODO: Fix this proper locking.
- CSingleExit ex(g_graphicsContext);
pNewWindow->OnMessage(msg);
// g_infoManager.SetPreviousWindow(WINDOW_INVALID);
}
@@ -26,6 +26,7 @@
#include "utils/log.h"
#include "settings/AdvancedSettings.h"
#include "utils/Variant.h"
+#include "guilib/GUIWindowManager.h"
using namespace ANNOUNCEMENT;
@@ -89,13 +90,8 @@ void CGUIWindowHome::Announce(AnnouncementFlag flag, const char *sender, const c
}
}
- // add the job immediatedly if the home window is active
- // otherwise defer it to the next initialisation
-
- if (IsActive())
- AddRecentlyAddedJobs(ra_flag);
- else
- m_updateRA |= ra_flag;
+ CGUIMessage reload(GUI_MSG_NOTIFY_ALL, GetID(), 0, GUI_MSG_REFRESH_THUMBS, ra_flag);
+ g_windowManager.SendThreadMessage(reload, GetID());
}
void CGUIWindowHome::AddRecentlyAddedJobs(int flag)
@@ -155,10 +151,13 @@ bool CGUIWindowHome::OnMessage(CGUIMessage& message)
case GUI_MSG_NOTIFY_ALL:
if (message.GetParam1() == GUI_MSG_WINDOW_RESET || message.GetParam1() == GUI_MSG_REFRESH_THUMBS)
{
+ int updateRA = (message.GetSenderId() == GetID()) ? message.GetParam2() : (Video | Audio | Totals);
+
if (IsActive())
- AddRecentlyAddedJobs(Video | Audio | Totals);
+ AddRecentlyAddedJobs(updateRA);
else
- m_updateRA |= (Video | Audio | Totals);
+ m_updateRA |= updateRA;
+
return true;
}
break;

0 comments on commit 2f7c13f

Please sign in to comment.