# HG changeset patch # User Markus Mützel # Date 1638725435 -3600 # Node ID 38085f903f23e9eccf5fceee3a4819b66f358db2 # Parent d5489b19bc4f6e7e5f709ed8dcc3d14466d6b6e7# Parent 88762923aa9a527bef2d8ea113019a4988c9d83f maint: merge release to default. diff -r d5489b19bc4f -r 38085f903f23 installer-files/octave-launch.c --- a/installer-files/octave-launch.c Sat Dec 04 15:32:37 2021 -0500 +++ b/installer-files/octave-launch.c Sun Dec 05 18:30:35 2021 +0100 @@ -338,6 +338,12 @@ StringCchCopyW (argbuffer, ARGBUF_SZ, L"octave.exe "); StringCchCatW (path, PATH_SZ, L"\\octave.exe"); + /* If parent process has a console, attach to it. + Let the function fail silently, when parent has no console + (e.g., when program has been started from link in start menu). + No console will be shown in this case. */ + AttachConsole (ATTACH_PARENT_PROCESS); + if (! (no_gui_libs || no_gui_arg_found)) { /* Unless --no-gui or --no-gui-libs is specified, we will use a GUI window. */