diff --git a/src/apps/mediaplayer/VideoView.cpp b/src/apps/mediaplayer/VideoView.cpp index 780addc74c..7715baad4f 100644 --- a/src/apps/mediaplayer/VideoView.cpp +++ b/src/apps/mediaplayer/VideoView.cpp @@ -32,6 +32,7 @@ VideoView::VideoView(BRect frame, const char* name, uint32 resizeMask) fIsPlaying(false), fIsFullscreen(false), fFullscreenControlsVisible(false), + fFirstAfterFullscreen(false), fSendHideCounter(0), fLastMouseMove(system_time()), @@ -115,6 +116,9 @@ VideoView::MessageReceived(BMessage* message) } +/*! + Disables the screen saver, and hides the full screen controls. +*/ void VideoView::Pulse() { @@ -124,12 +128,13 @@ VideoView::Pulse() bigtime_t now = system_time(); if (now - fLastMouseMove > 1500000) { fLastMouseMove = now; - // take care of disabling the screen saver BPoint where; uint32 buttons; GetMouse(&where, &buttons, false); if (buttons == 0) { - if (fFullscreenControlsVisible) { + // Hide the full screen controls (and the mouse pointer) + // after a while + if (fFullscreenControlsVisible || fFirstAfterFullscreen) { if (fSendHideCounter == 0 || fSendHideCounter == 3) { // Send after 1.5s and after 4.5s BMessage message(M_HIDE_FULL_SCREEN_CONTROLS); @@ -139,8 +144,10 @@ VideoView::Pulse() Window()->PostMessage(&message, Window()); } fSendHideCounter++; + fFirstAfterFullscreen = false; } + // Take care of disabling the screen saver ConvertToScreen(&where); set_mouse_position((int32)where.x, (int32)where.y); } @@ -303,6 +310,7 @@ VideoView::SetFullscreen(bool fullScreen) { fIsFullscreen = fullScreen; fSendHideCounter = 0; + fFirstAfterFullscreen = true; } diff --git a/src/apps/mediaplayer/VideoView.h b/src/apps/mediaplayer/VideoView.h index 40611d0348..ab8e84aa14 100644 --- a/src/apps/mediaplayer/VideoView.h +++ b/src/apps/mediaplayer/VideoView.h @@ -70,6 +70,7 @@ private: bool fIsPlaying; bool fIsFullscreen; bool fFullscreenControlsVisible; + bool fFirstAfterFullscreen; uint8 fSendHideCounter; bigtime_t fLastMouseMove;