Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8ff7f72

Browse files
committed
Closes #17290: Merged fix from 3.3.
2 parents b26545e + 66fef9f commit 8ff7f72

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

PC/launcher.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)