Don't explicitly attach progress dialog thread input

This is actually completely unnecessary because this is done implicitly
by Windows itself anyhow when we create the dialog with the owner window
belonging to a different thread.

Notice that this also explains why the thread input can't be detached
later.
This commit is contained in:
Vadim Zeitlin
2017-10-30 19:12:16 +01:00
parent 1c62ebdcd7
commit cac3d39fa1

View File

@@ -1028,26 +1028,6 @@ void* wxProgressDialogTaskRunner::Entry()
parent = m_sharedData.m_parent;
}
if ( parent )
{
// Force the creation of the message queue for this thread.
MSG msg;
::PeekMessage(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE);
// Attach its message queue to the main thread in order to allow using
// the parent window created by the main thread as task dialog parent.
if ( !::AttachThreadInput(::GetCurrentThreadId(),
wxThread::GetMainId(),
TRUE) )
{
wxLogLastError(wxT("AttachThreadInput"));
// Don't even try using the parent window from another thread, this
// won't work.
parent = NULL;
}
}
WinStruct<TASKDIALOGCONFIG> tdc;
wxMSWTaskDialogConfig wxTdc;