summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/view/viewer.c14
1 files 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);