diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp index 65168f2121a..2471881df1d 100644 --- a/mythtv/libs/libmythtv/tv_play.cpp +++ b/mythtv/libs/libmythtv/tv_play.cpp @@ -1881,13 +1881,6 @@ void TV::HandleStateChange(PlayerContext *mctx, PlayerContext *ctx) VERBOSE(VB_IMPORTANT, "We have a RingBuffer"); - if (GetMythMainWindow() && !weDisabledGUI) - { - weDisabledGUI = true; - GetMythMainWindow()->PushDrawDisabled(); - DrawUnusedRects(); - } - if (ctx->playingInfo && StartRecorder(ctx,-1)) { ok = StartPlayer(mctx, ctx, desiredNextState); @@ -1903,7 +1896,6 @@ void TV::HandleStateChange(PlayerContext *mctx, PlayerContext *ctx) } else if (!ctx->IsPIP()) { - GetMythUI()->DisableScreensaver(); if (!lastLockSeenTime.isValid() || (lastLockSeenTime < timerOffTime)) { @@ -1951,15 +1943,6 @@ void TV::HandleStateChange(PlayerContext *mctx, PlayerContext *ctx) if (ctx->buffer && ctx->buffer->IsOpen()) { - GetMythUI()->DisableScreensaver(); - - if (GetMythMainWindow() && !weDisabledGUI) - { - weDisabledGUI = true; - GetMythMainWindow()->PushDrawDisabled(); - DrawUnusedRects(); - } - if (desiredNextState == kState_WatchingRecording) { ctx->LockPlayingInfo(__FILE__, __LINE__); @@ -2111,6 +2094,8 @@ void TV::HandleStateChange(PlayerContext *mctx, PlayerContext *ctx) TRANSITION(kState_None, kState_WatchingRecording) || TRANSITION(kState_None, kState_WatchingLiveTV)) { + if (!ctx->IsPIP()) + GetMythUI()->DisableScreensaver(); MythMainWindow *mainWindow = GetMythMainWindow(); mainWindow->setBaseSize(player_bounds.size()); mainWindow->setMinimumSize( @@ -2120,6 +2105,12 @@ void TV::HandleStateChange(PlayerContext *mctx, PlayerContext *ctx) QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX)); mainWindow->setGeometry(player_bounds); GetMythMainWindow()->GetPaintWindow()->hide(); + if (!weDisabledGUI) + { + weDisabledGUI = true; + GetMythMainWindow()->PushDrawDisabled(); + } + DrawUnusedRects(); } VERBOSE(VB_PLAYBACK, LOC +