delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/07/27/09:09:47

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:subject:mime-version:content-type
:content-transfer-encoding:date:from:in-reply-to:references
:message-id; q=dns; s=default; b=VBkB8SFaDKbezhAemiZxOFepLEF+uyN
Px2PFPQ27GOEzRz+mMAMunWWbKPKBEN6kVp/UMo2prrQ2+GVKd85moWGuSOZGM9J
WSQFC7bXXeqnEW74KGo3+IJnVYAYKJzbzBJ6tR82kDta+zjSOQxCIFEyzTK+Kze8
Cfm9Ppkyi0lU=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:subject:mime-version:content-type
:content-transfer-encoding:date:from:in-reply-to:references
:message-id; s=default; bh=Cb+YX3BJim3IfLj/C085zJYB6YI=; b=dUTeV
RwApoFrHlIuAYc18Ku4MXuEZR3JINywrP9A+yHJVyZDx48Xle6iCXdL0viqyH21D
qAS6cUG/6CkXU1vfse0Hcy3fqYZT4AVYdgVvX+c4beuasmtImwIW9W4Bj/LX73yV
VHBz0yo7bhBI8iIGXy9HPpxY1W+QHdHx9KAfX4=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
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
To: Cygwin <cygwin AT cygwin DOT com>
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
Date: Wed, 27 Jul 2016 06:09:14 -0700
From: Kaz Kylheku <kaz AT kylheku DOT com>
In-Reply-To: <05e87c9326e8bc9a32a5a3cd2511fe98@mail.kylheku.com>
References: <05e87c9326e8bc9a32a5a3cd2511fe98 AT mail DOT kylheku DOT com>
Message-ID: <9b05b6502dc0bdba2654069cfa924a50@mail.kylheku.com>
X-Sender: kaz AT kylheku DOT com
User-Agent: Roundcube Webmail/0.9.2
X-CMAE-Envelope: MS4wfJjv4X2WNrRU5knpJEtNhUmERIFvXTK6BVqp+0xZkI0Amd7KLwxNbqTtnaZzLQTKvifinkaDVtvQjuX1D6IshmpX65VJcGuWA5BabwdYbAX7jTk3y6rE SyoOx/acDPjI8tlY3p3Tb9P7pa2rV7Ag37BS/qAMhA6JN+Salvk0rdYE
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u6RD9gJ2026663

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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019