aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmarshallnz <jcmarsha@gmail.com>2014-06-09 21:47:00 +1200
committerJonathan Marshall <jmarshall@xbmc.org>2014-06-15 16:25:14 +1200
commit75107323ff6f3db3736c6bf0519b131cee2f6c61 (patch)
tree514d735dd679dc947fc73669787e1704c1cff74b
parentc50fac140da0d7be8a4f466d6d41cfb850307ce6 (diff)
Merge pull request #4169 from koying/fixdvdtouch
FIX: do not popup OSD on DVD menu with touch or mouse (fixes #14906)
-rw-r--r--xbmc/Application.cpp4
-rw-r--r--xbmc/cores/dvdplayer/DVDPlayer.cpp10
-rw-r--r--xbmc/cores/omxplayer/OMXPlayer.cpp10
-rw-r--r--xbmc/guilib/Key.h2
-rw-r--r--xbmc/video/windows/GUIWindowFullScreen.cpp25
-rw-r--r--xbmc/video/windows/GUIWindowFullScreen.h1
6 files changed, 39 insertions, 13 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index f3ea7f1624..43bc778785 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -2692,6 +2692,10 @@ bool CApplication::OnAction(const CAction &action)
{
if (m_pPlayer->OnAction(action))
return true;
+ // Player ignored action; popup the OSD
+ if ((action.GetID() == ACTION_MOUSE_MOVE && (action.GetAmount(2) || action.GetAmount(3))) // filter "false" mouse move from touch
+ || action.GetID() == ACTION_MOUSE_LEFT_CLICK)
+ CApplicationMessenger::Get().SendAction(CAction(ACTION_TRIGGER_OSD), WINDOW_INVALID, false);
}
// stop : stops playing current audio song
diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp
index 3a37dee87e..a485275f44 100644
--- a/xbmc/cores/dvdplayer/DVDPlayer.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp
@@ -3729,7 +3729,15 @@ bool CDVDPlayer::OnAction(const CAction &action)
pt.y *= rs.Height() / rd.Height();
pt += CPoint(rs.x1, rs.y1);
if (action.GetID() == ACTION_MOUSE_LEFT_CLICK)
- return pMenus->OnMouseClick(pt);
+ {
+ if (pMenus->OnMouseClick(pt))
+ return true;
+ else
+ {
+ CApplicationMessenger::Get().SendAction(CAction(ACTION_TRIGGER_OSD), WINDOW_INVALID, false); // Trigger the osd
+ return false;
+ }
+ }
return pMenus->OnMouseMove(pt);
}
break;
diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp
index 0b80be5191..2515fa19c5 100644
--- a/xbmc/cores/omxplayer/OMXPlayer.cpp
+++ b/xbmc/cores/omxplayer/OMXPlayer.cpp
@@ -3998,7 +3998,15 @@ bool COMXPlayer::OnAction(const CAction &action)
pt.y *= rs.Height() / rd.Height();
pt += CPoint(rs.x1, rs.y1);
if (action.GetID() == ACTION_MOUSE_LEFT_CLICK)
- return pMenus->OnMouseClick(pt);
+ {
+ if (pMenus->OnMouseClick(pt))
+ return true;
+ else
+ {
+ CApplicationMessenger::Get().SendAction(CAction(ACTION_TRIGGER_OSD), WINDOW_INVALID, false); // Trigger the osd
+ return false;
+ }
+ }
return pMenus->OnMouseMove(pt);
}
break;
diff --git a/xbmc/guilib/Key.h b/xbmc/guilib/Key.h
index 3f4e6fb127..0105cd4862 100644
--- a/xbmc/guilib/Key.h
+++ b/xbmc/guilib/Key.h
@@ -332,6 +332,8 @@
#define ACTION_SETTINGS_RESET 241
#define ACTION_SETTINGS_LEVEL_CHANGE 242
+#define ACTION_TRIGGER_OSD 243 // show autoclosing OSD. Can b used in videoFullScreen.xml window id=2005
+
// touch actions
#define ACTION_TOUCH_TAP 401
#define ACTION_TOUCH_TAP_TEN 410
diff --git a/xbmc/video/windows/GUIWindowFullScreen.cpp b/xbmc/video/windows/GUIWindowFullScreen.cpp
index 8b88704def..4caa4066d4 100644
--- a/xbmc/video/windows/GUIWindowFullScreen.cpp
+++ b/xbmc/video/windows/GUIWindowFullScreen.cpp
@@ -142,6 +142,10 @@ bool CGUIWindowFullScreen::OnAction(const CAction &action)
ToggleOSD();
return true;
+ case ACTION_TRIGGER_OSD:
+ TriggerOSD();
+ return true;
+
case ACTION_SHOW_GUI:
{
// switch back to the menu
@@ -538,17 +542,6 @@ EVENT_RESULT CGUIWindowFullScreen::OnMouseEvent(const CPoint &point, const CMous
}
if (event.m_id >= ACTION_GESTURE_NOTIFY && event.m_id <= ACTION_GESTURE_END) // gestures
return EVENT_RESULT_UNHANDLED;
- if (event.m_id != ACTION_MOUSE_MOVE || event.m_offsetX || event.m_offsetY)
- { // some other mouse action has occurred - bring up the OSD
- // if it is not already running
- CGUIDialogVideoOSD *pOSD = (CGUIDialogVideoOSD *)g_windowManager.GetWindow(WINDOW_DIALOG_VIDEO_OSD);
- if (pOSD && !pOSD->IsDialogRunning())
- {
- pOSD->SetAutoClose(3000);
- pOSD->DoModal();
- }
- return EVENT_RESULT_HANDLED;
- }
return EVENT_RESULT_UNHANDLED;
}
@@ -862,3 +855,13 @@ void CGUIWindowFullScreen::ToggleOSD()
pOSD->DoModal();
}
}
+
+void CGUIWindowFullScreen::TriggerOSD()
+{
+ CGUIDialogVideoOSD *pOSD = (CGUIDialogVideoOSD *)g_windowManager.GetWindow(WINDOW_DIALOG_VIDEO_OSD);
+ if (pOSD && !pOSD->IsDialogRunning())
+ {
+ pOSD->SetAutoClose(3000);
+ pOSD->DoModal();
+ }
+}
diff --git a/xbmc/video/windows/GUIWindowFullScreen.h b/xbmc/video/windows/GUIWindowFullScreen.h
index bb8514c94e..03608afb9a 100644
--- a/xbmc/video/windows/GUIWindowFullScreen.h
+++ b/xbmc/video/windows/GUIWindowFullScreen.h
@@ -44,6 +44,7 @@ private:
void SeekChapter(int iChapter);
void FillInTVGroups();
void ToggleOSD();
+ void TriggerOSD();
enum SEEK_TYPE { SEEK_ABSOLUTE, SEEK_RELATIVE };
enum SEEK_DIRECTION { SEEK_FORWARD, SEEK_BACKWARD };