[Bug 687683] gswin32c : Ctrl+C doesn't stop the application
"Russell Lang" <[email protected]> Sat, 18 Sep 2004 22:14:39 +1000
| Newsgroups | gmane.comp.printing.ghostscript.patches |
|---|---|
| Message-ID | <414CB350.21653.29E86E8@localhost> |
Note that this fix does not address the issue of whether ghostscript should cleanup on exit. At the moment typing Ctrl+C causes the process to exit. This could leave behind ghostscript temporary files. A change to this behaviour would need to apply to several platforms, not just Windows. Log Message: Fixes bug #687683 "gswin32c : Ctrl+C doesn't stop the application". Make Ctrl+C in the image window act the same as Ctrl+C in the console window, which generates a signal to exit the process. Russell Lang [email protected] Ghostgum Software Pty Ltd http://www.ghostgum.com.au/ --- l:/cvs/gs/src/dwimg.c Tue Sep 14 06:42:32 2004 +++ src/dwimg.c Sat Sep 18 11:59:26 2004 @@ -1363,7 +1363,9 @@ if (GetKeyState(VK_SHIFT)) cks |= SHIFT_PRESSED; ir.Event.KeyEvent.dwControlKeyState = cks; - if (hStdin != INVALID_HANDLE_VALUE) + if (ir.Event.KeyEvent.uChar.AsciiChar == 3) + GenerateConsoleCtrlEvent(CTRL_C_EVENT, NULL); + else if (hStdin != INVALID_HANDLE_VALUE) WriteConsoleInput(hStdin, &ir, 1, &dwWritten); } return 0; _______________________________________________ gs-code-review mailing list [email protected] http://www.ghostscript.com/mailman/listinfo/gs-code-review