mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-24 09:49:42 +01:00
Fix compile on mingw32
This commit is contained in:
parent
dccc4e6225
commit
4b5caaceef
@ -561,12 +561,25 @@ setNam( QNetworkAccessManager* nam )
|
||||
void
|
||||
bringToFront()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
QWidgetList widgetList = qApp->topLevelWidgets();
|
||||
int i = 0;
|
||||
while( !widgetList.at( i )->isWindow() )
|
||||
i++;
|
||||
QWidget *widget = widgetList.at( i );
|
||||
|
||||
widget->show();
|
||||
widget->activateWindow();
|
||||
widget->raise();
|
||||
|
||||
WId wid = widget->winId();
|
||||
|
||||
HWND hwndActiveWin = GetForegroundWindow();
|
||||
int idActive = GetWindowThreadProcessId(hwndActiveWin, NULL);
|
||||
if ( AttachThreadInput(GetCurrentThreadId(), idActive, TRUE) )
|
||||
{
|
||||
SetForegroundWindow( win );
|
||||
SetFocus( win );
|
||||
SetForegroundWindow( wid );
|
||||
SetFocus( wid );
|
||||
AttachThreadInput(GetCurrentThreadId(), idActive, FALSE);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user