This is the mail archive of the
mailing list for the Cygwin project.
Re: Strange behavior of cmd.exe when hammered with clear screen operations from Cygwin program.
- From: Kaz Kylheku <kaz at kylheku dot com>
- To: Cygwin <cygwin at cygwin dot com>
- Date: Wed, 27 Jul 2016 06:09:14 -0700
- Subject: Re: Strange behavior of cmd.exe when hammered with clear screen operations from Cygwin program.
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org>
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
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
index 5fe4480..2b8acb5 100644
@@ -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
preserve the buffer. */
if (!con.scroll_window (h, x1, y1, x2, y2))
con.clear_screen (h, x1, y1, x2, y2);
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple