diff options
author | jmarshallnz <jmarshallnz@svn> | 2010-01-09 09:59:14 +0000 |
---|---|---|
committer | jmarshallnz <jmarshallnz@svn> | 2010-01-09 09:59:14 +0000 |
commit | d4b15f6875a4eb38113b5130d368aba5be8f0db3 (patch) | |
tree | fabf64e6c6067c08bd0ece627f40829c263eac5f /guilib/GUIWindow.cpp | |
parent | b4e9c6e4ded76ee0b5fed461a748c59e2e313304 (diff) |
changed: OnMouse() -> OnMouseEvent() for consistency with base classes, and use the event class members where reasonable rather than accessing the global mouse members.
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@26581 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib/GUIWindow.cpp')
-rw-r--r-- | guilib/GUIWindow.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/guilib/GUIWindow.cpp b/guilib/GUIWindow.cpp index 1d046e65c6..143b779d38 100644 --- a/guilib/GUIWindow.cpp +++ b/guilib/GUIWindow.cpp @@ -390,13 +390,15 @@ bool CGUIWindow::OnMouseAction() if (SendMouseEvent(mousePoint, *event)) return true; - // unhandled - return OnMouse(mousePoint); + // no control wanted it - see if we can handle it ourselves + bool handled = OnMouseEvent(mousePoint, *event); + delete event; + return handled; } -bool CGUIWindow::OnMouse(const CPoint &point) +bool CGUIWindow::OnMouseEvent(const CPoint &point, const CMouseEvent &event) { - if (g_Mouse.bClick[MOUSE_RIGHT_BUTTON]) + if (event.m_id == ACTION_MOUSE_RIGHT_CLICK) { // no control found to absorb this click - go to previous menu CAction action; action.id = ACTION_PREVIOUS_MENU; |