Adhere to standard OSX app practices and bounce the icon whenever Firestorm is not the active app

Cinders 2013-10-02 00:32:36 -06:00
parent 0dd8c6591d
commit db4543dbf8
3 changed files with 25 additions and 17 deletions

View File

@ -1276,20 +1276,23 @@ void LLWindowSDL::x11_set_urgent(BOOL urgent)
void LLWindowSDL::flashIcon(F32 seconds)
{
if (getMinimized()) // <FS:CR> Moved this here from llviewermessage.cpp
{
#if !LL_X11
llinfos << "Stub LLWindowSDL::flashIcon(" << seconds << ")" << llendl;
llinfos << "Stub LLWindowSDL::flashIcon(" << seconds << ")" << llendl;
#else
llinfos << "X11 LLWindowSDL::flashIcon(" << seconds << ")" << llendl;
llinfos << "X11 LLWindowSDL::flashIcon(" << seconds << ")" << llendl;
F32 remaining_time = mFlashTimer.getRemainingTimeF32();
if (remaining_time < seconds)
remaining_time = seconds;
mFlashTimer.reset();
mFlashTimer.setTimerExpirySec(remaining_time);
F32 remaining_time = mFlashTimer.getRemainingTimeF32();
if (remaining_time < seconds)
remaining_time = seconds;
mFlashTimer.reset();
mFlashTimer.setTimerExpirySec(remaining_time);
x11_set_urgent(TRUE);
mFlashing = TRUE;
x11_set_urgent(TRUE);
mFlashing = TRUE;
#endif // LL_X11
}
}

View File

@ -2837,14 +2837,17 @@ BOOL LLWindowWin32::getClientRectInScreenSpace( RECT* rectp )
void LLWindowWin32::flashIcon(F32 seconds)
{
FLASHWINFO flash_info;
if (getMinimized()) // <FS:CR> Moved this here from llviewermessage.cpp
{
FLASHWINFO flash_info;
flash_info.cbSize = sizeof(FLASHWINFO);
flash_info.hwnd = mWindowHandle;
flash_info.dwFlags = FLASHW_TRAY;
flash_info.uCount = UINT(seconds / ICON_FLASH_TIME);
flash_info.dwTimeout = DWORD(1000.f * ICON_FLASH_TIME); // milliseconds
FlashWindowEx(&flash_info);
flash_info.cbSize = sizeof(FLASHWINFO);
flash_info.hwnd = mWindowHandle;
flash_info.dwFlags = FLASHW_TRAY;
flash_info.uCount = UINT(seconds / ICON_FLASH_TIME);
flash_info.dwTimeout = DWORD(1000.f * ICON_FLASH_TIME); // milliseconds
FlashWindowEx(&flash_info);
}
}
F32 LLWindowWin32::getGamma()

View File

@ -3916,7 +3916,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
LLWindow* viewer_window = gViewerWindow->getWindow();
if (viewer_window && viewer_window->getMinimized())
// <FS:CR> Make osx dashboard icon bounce when window isn't in focus
//if (viewer_window && viewer_window->getMinimized())
if (viewer_window)
{
viewer_window->flashIcon(5.f);
}