[fix] check active window before delegating player action handling - fixes problem...
authorVoyager1 <voyager@xbmc.org>
Sat, 29 Jun 2013 05:45:59 +0000 (07:45 +0200)
committerVoyager1 <voyager@xbmc.org>
Sat, 29 Jun 2013 06:02:58 +0000 (08:02 +0200)
xbmc/Application.cpp

index d4932d3..a2b6cae 100644 (file)
@@ -2483,8 +2483,12 @@ bool CApplication::OnAction(const CAction &action)
   }
 
   // Now check with the player if action can be handled.
-  if (m_pPlayer != NULL && m_pPlayer->OnAction(action))
-    return true;
+  if (g_windowManager.GetActiveWindow() == WINDOW_FULLSCREEN_VIDEO ||
+      g_windowManager.GetActiveWindow() == WINDOW_DIALOG_VIDEO_OSD && (action.GetID() == ACTION_NEXT_ITEM || action.GetID() == ACTION_PREV_ITEM || action.GetID() == ACTION_CHANNEL_UP || action.GetID() == ACTION_CHANNEL_DOWN))
+  {
+    if (m_pPlayer != NULL && m_pPlayer->OnAction(action))
+      return true;
+  }
 
   // stop : stops playing current audio song
   if (action.GetID() == ACTION_STOP)