diff options
author | John Rennie <john.rennie@ratsauce.co.uk> | 2011-06-01 18:24:07 +0100 |
---|---|---|
committer | John Rennie <john.rennie@ratsauce.co.uk> | 2011-06-01 18:24:07 +0100 |
commit | dbe9e4a02413319902e7279d40ff010cb28cabf2 (patch) | |
tree | 8a46d8aa12b6a352310b6c2d13ba6c8196818280 | |
parent | 95e434ca0ce2ad4656b0be9246ede6ee0b724938 (diff) |
Handle mouse action routing to modal dialogs properly
-rw-r--r-- | xbmc/Application.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index 78a9b4f803..fe6b8d3249 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -2914,8 +2914,12 @@ bool CApplication::ProcessMouse() uint32_t mousecommand = g_Mouse.GetAction(); // Retrieve the corresponding action + int iWin; CKey key(mousecommand | KEY_MOUSE, (unsigned int) 0); - int iWin = g_windowManager.GetActiveWindow() & WINDOW_ID_MASK; + if (g_windowManager.HasModalDialog()) + iWin = g_windowManager.GetTopMostModalDialogID() & WINDOW_ID_MASK; + else + iWin = g_windowManager.GetActiveWindow() & WINDOW_ID_MASK; CAction mouseaction = CButtonTranslator::GetInstance().GetAction(iWin, key); // If we couldn't find an action return false to indicate we have not |