From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102057 invoked by alias); 27 Jul 2016 13:09:30 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 102047 invoked by uid 89); 27 Jul 2016 13:09:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=kaz, Kylheku, kylheku, Kaz X-HELO: smtp-out-so.shaw.ca Received: from smtp-out-so.shaw.ca (HELO smtp-out-so.shaw.ca) (64.59.136.138) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 27 Jul 2016 13:09:19 +0000 Received: from kylheku.com ([24.85.175.81]) by shaw.ca with SMTP id SOaJbBCM9gdalSOaKb0tv3; Wed, 27 Jul 2016 07:09:17 -0600 X-Authority-Analysis: v=2.2 cv=Q++Q2M+a c=1 sm=1 tr=0 a=WiYoHcCliNeVponEdG0Ckg==:117 a=WiYoHcCliNeVponEdG0Ckg==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=cAmyUtKerLwA:10 a=S9ygkhV7IAp99-eNGUgA:9 Received: from www-data by kylheku.com with local (Exim 4.72) (envelope-from ) id 1bSOaI-0000HU-DG for cygwin@cygwin.com; Wed, 27 Jul 2016 06:09:14 -0700 To: Cygwin Subject: Re: Strange behavior of cmd.exe when hammered with clear screen operations from Cygwin program. X-PHP-Originating-Script: 501:rcmail.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Date: Wed, 27 Jul 2016 13:09:00 -0000 From: Kaz Kylheku In-Reply-To: <05e87c9326e8bc9a32a5a3cd2511fe98@mail.kylheku.com> References: <05e87c9326e8bc9a32a5a3cd2511fe98@mail.kylheku.com> Message-ID: <9b05b6502dc0bdba2654069cfa924a50@mail.kylheku.com> X-Sender: kaz@kylheku.com User-Agent: Roundcube Webmail/0.9.2 X-CMAE-Envelope: MS4wfJjv4X2WNrRU5knpJEtNhUmERIFvXTK6BVqp+0xZkI0Amd7KLwxNbqTtnaZzLQTKvifinkaDVtvQjuX1D6IshmpX65VJcGuWA5BabwdYbAX7jTk3y6rE SyoOx/acDPjI8tlY3p3Tb9P7pa2rV7Ag37BS/qAMhA6JN+Salvk0rdYE X-SW-Source: 2016-07/txt/msg00319.txt.bz2 On 26.07.2016 22:19, Kaz Kylheku wrote: > The test program featured below works fine under > the Cygwin console window. >=20 > 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=20 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=20 yc1, cltype xc2, cltype yc2) /* Detect special case - scroll the screen if we have a buffer in=20 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