File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -500,6 +500,21 @@ run_child(wchar_t * cmdline)
500500 STARTUPINFOW si ;
501501 PROCESS_INFORMATION pi ;
502502
503+ #if defined(_WINDOWS )
504+ // When explorer launches a Windows (GUI) application, it displays
505+ // the "app starting" (the "pointer + hourglass") cursor for a number
506+ // of seconds, or until the app does something UI-ish (eg, creating a
507+ // window, or fetching a message). As this launcher doesn't do this
508+ // directly, that cursor remains even after the child process does these
509+ // things. We avoid that by doing a simple post+get message.
510+ // See http://bugs.python.org/issue17290 and
511+ // https://bitbucket.org/vinay.sajip/pylauncher/issue/20/busy-cursor-for-a-long-time-when-running
512+ MSG msg ;
513+
514+ PostMessage (0 , 0 , 0 , 0 );
515+ GetMessage (& msg , 0 , 0 , 0 );
516+ #endif
517+
503518 debug (L"run_child: about to run '%s'\n" , cmdline );
504519 job = CreateJobObject (NULL , NULL );
505520 ok = QueryInformationJobObject (job , JobObjectExtendedLimitInformation ,
You can’t perform that action at this time.
0 commit comments