os_win32.C: remove console-hiding code

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@15338 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Bo Peng 2006-10-15 15:04:41 +00:00
parent 7424e3a0d7
commit 4a3a9e24ca
2 changed files with 10 additions and 24 deletions

View File

@ -1,3 +1,6 @@
2006-10-15 Bo Peng <ben.bob@gmail.com>
* os_win32.C: remove console-hiding code
2006-09-07 Enrico Forestieri <[EMAIL PROTECTED]>
* os_cygwin.C (is_windows_path): avoid unnecessary conversion
when path is relative

View File

@ -125,30 +125,13 @@ void init(int /* argc */, char * argv[])
* I've chosen for now, therefore, to simply add Ruurd's original
* code as-is.
*/
// Close the console when run (probably)
// not run from command prompt
char WindowTitle[1024];
if (GetConsoleTitle(WindowTitle, sizeof(WindowTitle)) == 0) {
// Could not get the title, so we just leave things as they are
return;
}
if ((strcmp(WindowTitle, argv[0]) == 0) ||
(strcmp(WindowTitle, "LyX") == 0)) {
// format a "unique" newWindowTitle
wsprintf(WindowTitle, "%d/%d",
GetTickCount(),
GetCurrentProcessId());
// change current window title
SetConsoleTitle(WindowTitle);
// ensure window title has been updated
Sleep(40);
// look for newWindowTitle
HWND const hwndFound = FindWindow(NULL, WindowTitle);
// If found, hide it
if (hwndFound != NULL)
ShowWindow( hwndFound, SW_HIDE);
}
/* A wrapper program hidecmd.c has been added to development/Win32
* which hides the console window of lyx when lyx is invoked through
* hidecmd.exe. Therefore, the console-hiding code has been removed
* so a console window will always be displayed if lyx is called without
* the wrapper.
*/
}