From 19742321471d300e273dd31b7a796f32c07b18e7 Mon Sep 17 00:00:00 2001 From: Ryan Leavengood Date: Wed, 20 Dec 2006 21:30:56 +0000 Subject: [PATCH] Changed the delay on hiding the cursor in fullscreen to 2 seconds (much better...not sure what I was thinking with 5 seconds before.) I also fixed a few other issues related to this. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19578 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/showimage/ShowImageView.cpp | 8 +++++--- src/apps/showimage/ShowImageView.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/apps/showimage/ShowImageView.cpp b/src/apps/showimage/ShowImageView.cpp index 0ad2609f62..f0c2ac343c 100644 --- a/src/apps/showimage/ShowImageView.cpp +++ b/src/apps/showimage/ShowImageView.cpp @@ -202,7 +202,9 @@ ShowImageView::ShowImageView(BRect rect, const char *name, uint32 resizingMode, #if DELAYED_SCALING fScalingCountDown = SCALING_DELAY_TIME; #endif + fShowingPopUpMenu = false; fHideCursorCountDown = HIDE_CURSOR_DELAY_TIME; + fIsActiveWin = true; if (settings->Lock()) { fDither = settings->GetBool("Dither", fDither); @@ -296,7 +298,7 @@ void ShowImageView::Pulse() { // animate marching ants - if (HasSelection() && fAnimateSelection && Window()->IsActive()) { + if (HasSelection() && fAnimateSelection && fIsActiveWin) { RotatePatterns(); DrawSelectionBox(); } @@ -311,7 +313,7 @@ ShowImageView::Pulse() } // Hide cursor in full screen mode - if (fFullScreen && !fShowingPopUpMenu && fIsActiveWin) { + if (fFullScreen && !HasSelection() && !fShowingPopUpMenu && fIsActiveWin) { if (fHideCursorCountDown <= 0) be_app->ObscureCursor(); else @@ -1379,7 +1381,6 @@ ShowImageView::MergeSelection() void ShowImageView::MouseDown(BPoint position) { - fHideCursorCountDown = HIDE_CURSOR_DELAY_TIME; BPoint point; uint32 buttons; MakeFocus(true); @@ -2568,6 +2569,7 @@ ShowImageView::ToggleSlideShow() void ShowImageView::ExitFullScreen() { + be_app->ShowCursor(); BMessenger m(Window()); m.SendMessage(MSG_EXIT_FULL_SCREEN); } diff --git a/src/apps/showimage/ShowImageView.h b/src/apps/showimage/ShowImageView.h index 470dbcde02..a38e834317 100644 --- a/src/apps/showimage/ShowImageView.h +++ b/src/apps/showimage/ShowImageView.h @@ -34,7 +34,7 @@ #define PEN_SIZE 1.0f // the delay time for hiding the cursor in 1/10 seconds (the pulse rate) -#define HIDE_CURSOR_DELAY_TIME 50 +#define HIDE_CURSOR_DELAY_TIME 20 class ShowImageView : public BView { public: