Cygwin: console: Fix a problem that minor ID is incorrect in ConEmu.
Previously, minor device number of console was not assigned correctly in ConEmu environment. This is because console window of ConEmu is not enumerated by EnumWindows(). This patch fixes the issue. Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
This commit is contained in:
parent
ac92c4c9f5
commit
8aad3a7ede
4 changed files with 30 additions and 0 deletions
|
@ -548,7 +548,9 @@ LoadDLLfunc (DefWindowProcW, user32)
|
|||
LoadDLLfunc (DestroyWindow, user32)
|
||||
LoadDLLfunc (DispatchMessageW, user32)
|
||||
LoadDLLfunc (EmptyClipboard, user32)
|
||||
LoadDLLfunc (EnumChildWindows, user32)
|
||||
LoadDLLfunc (EnumWindows, user32)
|
||||
LoadDLLfunc (GetClassNameA, user32)
|
||||
LoadDLLfunc (GetClipboardData, user32)
|
||||
LoadDLLfunc (GetDC, user32)
|
||||
LoadDLLfunc (GetForegroundWindow, user32)
|
||||
|
|
|
@ -81,6 +81,13 @@ enum_cons_dev (HWND hw, LPARAM lp)
|
|||
UnmapViewOfFile ((void *) cs);
|
||||
CloseHandle (h);
|
||||
}
|
||||
else
|
||||
{ /* Only for ConEmu */
|
||||
char class_hw[32];
|
||||
if (19 == GetClassName (hw, class_hw, sizeof (class_hw))
|
||||
&& 0 == strcmp (class_hw, "VirtualConsoleClass"))
|
||||
EnumChildWindows (hw, enum_cons_dev, lp);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -77,6 +77,13 @@ enum_cons_dev (HWND hw, LPARAM lp)
|
|||
UnmapViewOfFile ((void *) cs);
|
||||
CloseHandle (h);
|
||||
}
|
||||
else
|
||||
{ /* Only for ConEmu */
|
||||
char class_hw[32];
|
||||
if (19 == GetClassName (hw, class_hw, sizeof (class_hw))
|
||||
&& 0 == strcmp (class_hw, "VirtualConsoleClass"))
|
||||
EnumChildWindows (hw, enum_cons_dev, lp);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -250,6 +250,13 @@ enum_windows (HWND hw, LPARAM lp)
|
|||
UnmapViewOfFile ((void *) cs);
|
||||
CloseHandle (h);
|
||||
}
|
||||
else
|
||||
{ /* Only for ConEmu */
|
||||
char class_hw[32];
|
||||
if (19 == GetClassName (hw, class_hw, sizeof (class_hw))
|
||||
&& 0 == strcmp (class_hw, "VirtualConsoleClass"))
|
||||
EnumChildWindows (hw, enum_windows, lp);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -656,6 +663,13 @@ scan_console (HWND hw, LPARAM lp)
|
|||
UnmapViewOfFile ((void *) cs);
|
||||
CloseHandle (h);
|
||||
}
|
||||
else
|
||||
{ /* Only for ConEmu */
|
||||
char class_hw[32];
|
||||
if (19 == GetClassName (hw, class_hw, sizeof (class_hw))
|
||||
&& 0 == strcmp (class_hw, "VirtualConsoleClass"))
|
||||
EnumChildWindows (hw, scan_console, lp);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue