diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-02-26 16:29:06 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-02-26 16:29:06 (GMT) |
commit | 66fef9f049c7f3f800ff6a25262eba920bdcec98 (patch) | |
tree | 35878e5af1519a7c40b55418b7f3e4d755c77812 /PC | |
parent | 236870439c13757577e36960d8ad9c7a6e8163c7 (diff) | |
download | cpython-66fef9f049c7f3f800ff6a25262eba920bdcec98.zip cpython-66fef9f049c7f3f800ff6a25262eba920bdcec98.tar.gz cpython-66fef9f049c7f3f800ff6a25262eba920bdcec98.tar.bz2 |
Closes #17290: Loading cursor now does not persist when launching GUI scripts.
Diffstat (limited to 'PC')
-rw-r--r-- | PC/launcher.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/PC/launcher.c b/PC/launcher.c index dfad44a..445e96e 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, @@ -1362,4 +1377,4 @@ int cdecl wmain(int argc, wchar_t ** argv) return process(argc, argv); } -#endif
\ No newline at end of file +#endif |