hrevr1alpha4-44573 adds 2 changesets to branch 'r1alpha4' old head: 6207466189b34544f41c259c60c701761012dd0a new head: 9eb96061272bd93a9329ebbb488dbeb0e604fe0b ---------------------------------------------------------------------------- b339da4: Fixed hiding the mouse cursor after going full screen. * This fixes a regression I introduced in hrev43648; the mouse cursor was only being hidden in case the controls were visible (ie. only after an extra mouse move in full screen). [ Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> ] 9eb9606: Move SetMouseEventMask() into MouseDown, where it should be. [ Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx> ] ---------------------------------------------------------------------------- 3 files changed, 12 insertions(+), 3 deletions(-) src/apps/mediaplayer/VideoView.cpp | 12 ++++++++++-- src/apps/mediaplayer/VideoView.h | 1 + src/preferences/filetypes/IconView.cpp | 2 +- ############################################################################ Commit: b339da426aa9c610709fefcd11a6907da086db18 URL: http://cgit.haiku-os.org/haiku/commit/?id=b339da4 Author: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> Date: Sat Aug 25 11:57:50 2012 UTC Fixed hiding the mouse cursor after going full screen. * This fixes a regression I introduced in hrev43648; the mouse cursor was only being hidden in case the controls were visible (ie. only after an extra mouse move in full screen). ---------------------------------------------------------------------------- diff --git a/src/apps/mediaplayer/VideoView.cpp b/src/apps/mediaplayer/VideoView.cpp index 780addc..7715baa 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 40611d0..ab8e84a 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; ############################################################################ Revision: hrevr1alpha4-44573 Commit: 9eb96061272bd93a9329ebbb488dbeb0e604fe0b URL: http://cgit.haiku-os.org/haiku/commit/?id=9eb9606 Author: Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx> Date: Thu Aug 23 14:02:36 2012 UTC Committer: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> Commit-Date: Mon Aug 27 08:29:25 2012 UTC Move SetMouseEventMask() into MouseDown, where it should be. ---------------------------------------------------------------------------- diff --git a/src/preferences/filetypes/IconView.cpp b/src/preferences/filetypes/IconView.cpp index 742508d..b9b688a 100644 --- a/src/preferences/filetypes/IconView.cpp +++ b/src/preferences/filetypes/IconView.cpp @@ -813,6 +813,7 @@ IconView::MouseDown(BPoint where) // start tracking - this icon might be dragged around fDragPoint = where; fTracking = true; + SetMouseEventMask(B_POINTER_EVENTS, B_NO_POINTER_HISTORY); } } @@ -903,7 +904,6 @@ IconView::MouseMoved(BPoint where, uint32 transit, const BMessage* dragMessage) DragMessage(&message, dragBitmap, B_OP_ALPHA, fDragPoint - BitmapRect().LeftTop(), this); fDragging = true; - SetMouseEventMask(B_POINTER_EVENTS, B_NO_POINTER_HISTORY); } if (dragMessage != NULL && !fDragging && AcceptsDrag(dragMessage)) {