Strange behavior of cmd.exe when hammered with clear screen operations from Cygwin program.
Kaz Kylheku
kaz@kylheku.com
Wed Jul 27 13:09:00 GMT 2016
On 26.07.2016 22:19, Kaz Kylheku wrote:
> The test program featured below works fine under
> the Cygwin console window.
>
> If executed from a cmd.exe console, strange things happen with the
> cmd.exe window. Suddenly, the window spontaneously resizes so that
> is taller than the desktop. A horizontal scrollbar may appear in it
> also, as well as an unpainted area through which the desktop is
> visible. As soon as you try to grab the title bar to resize it, it
> disappears. It hasn't quit; it is actually minimized. You can
> maximize it from the task bar and then resize the tall window to
> its original shape.
Narrowed it down to the con.scroll_window call in
fhandler_console::clear_screen.
The following test change makes the behavior go away. Moreover,
the repeated clear screen requests stop making the vertical scroll
bar jump around like crazy:
diff --git a/winsup/cygwin/fhandler_console.cc
b/winsup/cygwin/fhandler_console.cc
index 5fe4480..2b8acb5 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -1261,7 +1261,9 @@ fhandler_console::clear_screen (cltype xc1, cltype
yc1, cltype xc2, cltype yc2)
/* Detect special case - scroll the screen if we have a buffer in
order to
preserve the buffer. */
+#if 0
if (!con.scroll_window (h, x1, y1, x2, y2))
+#endif
con.clear_screen (h, x1, y1, x2, y2);
}
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list