[explorer]

- Run the dialog window in a new thread patch by Mikhail Denisenko <denisenkom AT gmail DOT com>
See issue #3339 for more details.

svn path=/trunk/; revision=51656
This commit is contained in:
Gabriel Ilardi 2011-05-09 10:32:49 +00:00
parent 4e8ffdfe77
commit 51534cffd8

View file

@ -2111,14 +2111,37 @@ void StartMenuHandler::ShowSearchComputer()
MessageBox(0, TEXT("SHFindComputer() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK); MessageBox(0, TEXT("SHFindComputer() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK);
} }
void StartMenuHandler::ShowLaunchDialog(HWND hwndOwner) struct RunDialogThread : public Thread
{
int Run();
};
int RunDialogThread::Run()
{ {
static DynamicFct<RUNFILEDLG> RunFileDlg(TEXT("SHELL32"), 61); static DynamicFct<RUNFILEDLG> RunFileDlg(TEXT("SHELL32"), 61);
// RunFileDlg needs owner window to properly position dialog
// that window will be disabled so we can't use DesktopBar
RECT rect = {0};
#ifndef TASKBAR_AT_TOP
rect.top = GetSystemMetrics(SM_CYSCREEN) - DESKTOPBARBAR_HEIGHT;
#endif
rect.right = GetSystemMetrics(SM_CXSCREEN);
rect.bottom = rect.top + DESKTOPBARBAR_HEIGHT;
Static dlgOwner(0, 0, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, 0, 0);
// Show "Run..." dialog // Show "Run..." dialog
if (RunFileDlg) { if (RunFileDlg) {
(*RunFileDlg)(hwndOwner, 0, NULL, NULL, NULL, RFF_CALCDIRECTORY); (*RunFileDlg)(dlgOwner, 0, NULL, NULL, NULL, RFF_CALCDIRECTORY);
} }
DestroyWindow(dlgOwner);
return 0;
}
void StartMenuHandler::ShowLaunchDialog(HWND hwndOwner)
{
RunDialogThread * rdt = new RunDialogThread();
rdt->Start();
} }
void StartMenuHandler::ShowLogoffDialog(HWND hwndOwner) void StartMenuHandler::ShowLogoffDialog(HWND hwndOwner)