summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorGeenz <geenz@geenzo.com>2013-07-11 19:37:08 -0400
committerGeenz <geenz@geenzo.com>2013-07-11 19:37:08 -0400
commitb2bec3f99c74d21bb1c2c68d73854f3990db26d5 (patch)
treee5e0c25e344267ead31d6f336d9999464944b671 /indra/llwindow
parent72bb473c9ed106cce6baf22ac74a13443d4630e8 (diff)
STORM-1942: dock icon bouncing unimplemented
Diffstat (limited to 'indra/llwindow')
-rwxr-xr-xindra/llwindow/llwindowmacosx-objc.h1
-rwxr-xr-xindra/llwindow/llwindowmacosx-objc.mm5
-rwxr-xr-xindra/llwindow/llwindowmacosx.cpp34
-rwxr-xr-xindra/llwindow/llwindowmacosx.h5
4 files changed, 9 insertions, 36 deletions
diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h
index 914fc534fb..020e2bff5b 100755
--- a/indra/llwindow/llwindowmacosx-objc.h
+++ b/indra/llwindow/llwindowmacosx-objc.h
@@ -68,6 +68,7 @@ void setNotAllowedCursor();
void hideNSCursor();
void showNSCursor();
void hideNSCursorTillMove(bool hide);
+void requestUserAttention();
NSWindowRef createNSWindow(int x, int y, int width, int height);
diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm
index 41d8e3ecd9..ef29515403 100755
--- a/indra/llwindow/llwindowmacosx-objc.mm
+++ b/indra/llwindow/llwindowmacosx-objc.mm
@@ -390,6 +390,11 @@ void makeFirstResponder(NSWindowRef window, GLViewRef view)
[(LLNSWindow*)window makeFirstResponder:(LLOpenGLView*)view];
}
+void requestUserAttention()
+{
+ [[NSApplication sharedApplication] requestUserAttention:NSInformationalRequest];
+}
+
/*
GLViewRef getGLView()
{
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index 737ecba368..e5556c23d4 100755
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -149,10 +149,6 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
mFSAASamples = fsaa_samples;
mForceRebuild = FALSE;
- // For reasons that aren't clear to me, LLTimers seem to be created in the "started" state.
- // Since the started state of this one is used to track whether the NMRec has been installed, it wants to start out in the "stopped" state.
- mBounceTimer.stop();
-
// Get the original aspect ratio of the main device.
mOriginalAspectRatio = (double)CGDisplayPixelsWide(mDisplay) / (double)CGDisplayPixelsHigh(mDisplay);
@@ -763,12 +759,6 @@ BOOL LLWindowMacOSX::getFullscreen()
void LLWindowMacOSX::gatherInput()
{
- // stop bouncing icon after fixed period of time
- if (mBounceTimer.getStarted() && mBounceTimer.getElapsedTimeF32() > mBounceTime)
- {
- stopDockTileBounce();
- }
-
updateCursor();
}
@@ -1161,22 +1151,9 @@ void LLWindowMacOSX::afterDialog()
void LLWindowMacOSX::flashIcon(F32 seconds)
{
- // Don't do this if we're already started, since this would try to install the NMRec twice.
- if(!mBounceTimer.getStarted())
- {
- S32 err = 0;
- // TODO: Implement icon bouncing
- mBounceTime = seconds;
- if(err == 0)
- {
- mBounceTimer.start();
- }
- else
- {
- // This is very not-fatal (only problem is the icon will not bounce), but we'd like to find out about it somehow...
- llinfos << "NMInstall failed with error code " << err << llendl;
- }
- }
+ // For consistency with OS X conventions, the number of seconds given is ignored and
+ // left up to the OS (which will actually bounce it for one second).
+ requestUserAttention();
}
BOOL LLWindowMacOSX::isClipboardTextAvailable()
@@ -1809,11 +1786,6 @@ void *LLWindowMacOSX::getPlatformWindow()
return (void*)mWindow;
}
-void LLWindowMacOSX::stopDockTileBounce()
-{
- mBounceTimer.stop();
-}
-
// get a double value from a dictionary
/*
static double getDictDouble (CFDictionaryRef refDict, CFStringRef key)
diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h
index 82195c2700..6a6b39e674 100755
--- a/indra/llwindow/llwindowmacosx.h
+++ b/indra/llwindow/llwindowmacosx.h
@@ -164,7 +164,6 @@ protected:
void destroyContext();
void setupFailure(const std::string& text, const std::string& caption, U32 type);
void adjustCursorDecouple(bool warpingMouse = false);
- void stopDockTileBounce();
static MASK modifiersToMask(S16 modifiers);
#if LL_OS_DRAGDROP_ENABLED
@@ -206,10 +205,6 @@ protected:
BOOL mForceRebuild;
S32 mDragOverrideCursor;
-
- F32 mBounceTime;
- //NMRec mBounceRec;
- LLTimer mBounceTimer;
// Input method management through Text Service Manager.
BOOL mLanguageTextInputAllowed;