add a comment

This commit is contained in:
Patrick von Reth 2015-04-17 10:57:51 +02:00
parent 4fb225402e
commit e072cc3203
1 changed files with 6 additions and 2 deletions

View File

@ -40,7 +40,6 @@ Utils::~Utils()
void Utils::bringWindowToFront(qlonglong _wid, bool focus)
{
snoreDebug(SNORE_DEBUG) << _wid;
#ifdef Q_OS_WIN
HWND wid = (HWND)_wid;
int active = attatchToActiveProcess();
@ -49,16 +48,21 @@ void Utils::bringWindowToFront(qlonglong _wid, bool focus)
SetFocus(wid);
}
detatchActiveProcess(active);
#else
Q_UNUSED(_wid);
Q_UNUSED(focus);
#endif
}
void Utils::raiseWindowToFront(qlonglong wid)
{
snoreDebug(SNORE_DEBUG) << wid;
// Looks like qt is handling it on linux.
#ifdef Q_OS_WIN
int active = attatchToActiveProcess();
SetWindowPos((HWND)wid, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
detatchActiveProcess(active);
#else
Q_UNUSED(wid);
#endif
}