add a comment
This commit is contained in:
parent
4fb225402e
commit
e072cc3203
|
@ -40,7 +40,6 @@ Utils::~Utils()
|
||||||
|
|
||||||
void Utils::bringWindowToFront(qlonglong _wid, bool focus)
|
void Utils::bringWindowToFront(qlonglong _wid, bool focus)
|
||||||
{
|
{
|
||||||
snoreDebug(SNORE_DEBUG) << _wid;
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
HWND wid = (HWND)_wid;
|
HWND wid = (HWND)_wid;
|
||||||
int active = attatchToActiveProcess();
|
int active = attatchToActiveProcess();
|
||||||
|
@ -49,16 +48,21 @@ void Utils::bringWindowToFront(qlonglong _wid, bool focus)
|
||||||
SetFocus(wid);
|
SetFocus(wid);
|
||||||
}
|
}
|
||||||
detatchActiveProcess(active);
|
detatchActiveProcess(active);
|
||||||
|
#else
|
||||||
|
Q_UNUSED(_wid);
|
||||||
|
Q_UNUSED(focus);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Utils::raiseWindowToFront(qlonglong wid)
|
void Utils::raiseWindowToFront(qlonglong wid)
|
||||||
{
|
{
|
||||||
snoreDebug(SNORE_DEBUG) << wid;
|
// Looks like qt is handling it on linux.
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
int active = attatchToActiveProcess();
|
int active = attatchToActiveProcess();
|
||||||
SetWindowPos((HWND)wid, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
|
SetWindowPos((HWND)wid, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
|
||||||
detatchActiveProcess(active);
|
detatchActiveProcess(active);
|
||||||
|
#else
|
||||||
|
Q_UNUSED(wid);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue