diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-02-26 16:29:46 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-02-26 16:29:46 (GMT) |
commit | 8ff7f7207c706e3c931c0f2c80923a472ef2e351 (patch) | |
tree | 6d32c767953964ba4cccd62dc72b7ba37d70dff5 /PC | |
parent | b26545e7b4a192bbf0ba76d64aad3efad4ddb184 (diff) | |
parent | 66fef9f049c7f3f800ff6a25262eba920bdcec98 (diff) | |
download | cpython-8ff7f7207c706e3c931c0f2c80923a472ef2e351.zip cpython-8ff7f7207c706e3c931c0f2c80923a472ef2e351.tar.gz cpython-8ff7f7207c706e3c931c0f2c80923a472ef2e351.tar.bz2 |
Closes #17290: Merged fix from 3.3.
Diffstat (limited to 'PC')
-rw-r--r-- | PC/launcher.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/PC/launcher.c b/PC/launcher.c index 358b99f..b311d9b 100644 --- a/PC/launcher.c +++ b/PC/launcher.c @@ -500,6 +500,21 @@ run_child(wchar_t * cmdline) STARTUPINFOW si; PROCESS_INFORMATION pi; +#if defined(_WINDOWS) + // When explorer launches a Windows (GUI) application, it displays + // the "app starting" (the "pointer + hourglass") cursor for a number + // of seconds, or until the app does something UI-ish (eg, creating a + // window, or fetching a message). As this launcher doesn't do this + // directly, that cursor remains even after the child process does these + // things. We avoid that by doing a simple post+get message. + // See http://bugs.python.org/issue17290 and + // https://bitbucket.org/vinay.sajip/pylauncher/issue/20/busy-cursor-for-a-long-time-when-running + MSG msg; + + PostMessage(0, 0, 0, 0); + GetMessage(&msg, 0, 0, 0); +#endif + debug(L"run_child: about to run '%s'\n", cmdline); job = CreateJobObject(NULL, NULL); ok = QueryInformationJobObject(job, JobObjectExtendedLimitInformation, |