aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris "Koying" Browet <cbro@semperpax.com>2016-03-04 00:28:47 +0100
committerChris "Koying" Browet <cbro@semperpax.com>2016-03-04 00:37:04 +0100
commit99f576c2affa3687520cda0e74143ad36f246d6d (patch)
tree52187d4be4acb4b0207e3f7f3aef704a6c9403c6
parent0d4a151b8a7ba977ead0862ce3d6cf508a388943 (diff)
FIX: [longpress] do not eat keypress after a longpress
A longpress triggers the action before the keyup, which is not called at all if a window/dialog is popped up. Result is m_Lastkey not being reset, and whatever keypress after returning to the original window being ignored.
-rw-r--r--xbmc/input/InputManager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xbmc/input/InputManager.cpp b/xbmc/input/InputManager.cpp
index 582ab35b2b..1e21e7bf7a 100644
--- a/xbmc/input/InputManager.cpp
+++ b/xbmc/input/InputManager.cpp
@@ -459,13 +459,13 @@ bool CInputManager::OnEvent(XBMC_Event& newEvent)
{
case XBMC_KEYDOWN:
{
- if (m_LastKey.GetButtonCode() & CKey::MODIFIER_LONG)
+ m_Keyboard.ProcessKeyDown(newEvent.key.keysym);
+ CKey key = m_Keyboard.TranslateKey(newEvent.key.keysym);
+ if (key.GetButtonCode() == m_LastKey.GetButtonCode() && m_LastKey.GetButtonCode() & CKey::MODIFIER_LONG)
{
// Do not repeat long presses
break;
}
- m_Keyboard.ProcessKeyDown(newEvent.key.keysym);
- CKey key = m_Keyboard.TranslateKey(newEvent.key.keysym);
if (!CButtonTranslator::GetInstance().HasLonpressMapping(g_windowManager.GetActiveWindowID(), key))
{
m_LastKey.Reset();