From 469328b25c14c47f0e2d8c98ca10b7942ea0e8f3 Mon Sep 17 00:00:00 2001 From: Minkyu Kang Date: Tue, 29 Dec 2015 20:59:07 +0900 Subject: viewer: set focus manually when playing the video Change-Id: Ia4164b191428e7e8e72bb7a11a27046ce991e651 Signed-off-by: Minkyu Kang --- src/view/viewer.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/view/viewer.c b/src/view/viewer.c index 428291f..707643d 100644 --- a/src/view/viewer.c +++ b/src/view/viewer.c @@ -188,7 +188,7 @@ struct _viewer_info { void (*callback)(void *, const char *); }; -static void _player_play(struct _priv *priv); +static void _player_play(struct _priv *priv, bool foc); static void _player_stop(struct _priv *priv); static void _player_pause(struct _priv *priv); @@ -299,11 +299,11 @@ static void _draw_contents(struct _priv *priv, int id, app_media_info *mi) if (id == VIEWER_MOVIE) { _image_unload(priv); - _player_play(priv); + _player_play(priv, false); return; } else if (id == VIEWER_VIDEO) { _image_unload(priv); - _player_play(priv); + _player_play(priv, false); if (!priv->slideshow.enable) _player_pause(priv); @@ -939,7 +939,7 @@ static void _player_play_pause(struct _priv *priv) } } -static void _player_play(struct _priv *priv) +static void _player_play(struct _priv *priv, bool foc) { app_media_info *mi; player_state_e state; @@ -989,7 +989,9 @@ static void _player_play(struct _priv *priv) ctl = priv->viewer.ctl[priv->viewer.cur]; ctl->ops->signal(ctl->handle, BTN_LOC_PLAY, SIG_SET_PAUSE); - ctl->ops->focus(ctl->handle, BTN_LOC_PLAY, true); + + if (foc) + ctl->ops->focus(ctl->handle, BTN_LOC_PLAY, true); } static void _player_pause(struct _priv *priv) @@ -1238,7 +1240,7 @@ static Eina_Bool _event_cb(void *data, int type, void *ei) } } else if (!strcmp(ev->keyname, KEY_PLAY)) { if (priv->viewer.cur != VIEWER_PHOTO) - _player_play(priv); + _player_play(priv, true); } else if (!strcmp(ev->keyname, KEY_PAUSE)) { if (priv->viewer.cur != VIEWER_PHOTO) _player_pause(priv); -- cgit v1.2.3