Skip to content
This repository
Browse code

Merge pull request #2533 from petriposio/master

[mouse] reworks the order of the mouse event handling (issue #2315)
  • Loading branch information...
commit 8d90fedea224a87312c27cb90c8429248849ad81 2 parents d106ccb + 721f365
jmarshallnz authored April 04, 2013

Showing 1 changed file with 10 additions and 0 deletions. Show diff stats Hide diff stats

  1. 10  xbmc/Application.cpp
10  xbmc/Application.cpp
@@ -3184,6 +3184,16 @@ bool CApplication::ProcessMouse()
3184 3184
   CKey key(mousecommand | KEY_MOUSE, (unsigned int) 0);
3185 3185
   CAction mouseaction = CButtonTranslator::GetInstance().GetAction(iWin, key);
3186 3186
 
  3187
+  // Deactivate mouse if non-mouse action
  3188
+  if (!mouseaction.IsMouse())
  3189
+    g_Mouse.SetActive(false);
  3190
+
  3191
+  // Consume ACTION_NOOP.
  3192
+  // Some views or dialogs gets closed after any ACTION and
  3193
+  // a sensitive mouse might cause problems.
  3194
+  if (mouseaction.GetID() == ACTION_NOOP)
  3195
+    return false;
  3196
+
3187 3197
   // If we couldn't find an action return false to indicate we have not
3188 3198
   // handled this mouse action
3189 3199
   if (!mouseaction.GetID())

0 notes on commit 8d90fed

Please sign in to comment.
Something went wrong with that request. Please try again.