From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34183 invoked by alias); 26 Jun 2015 14:39:13 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 34167 invoked by uid 89); 26 Jun 2015 14:39:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 26 Jun 2015 14:39:11 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 4C951C99E0; Fri, 26 Jun 2015 14:39:10 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5QEd8m8009396; Fri, 26 Jun 2015 10:39:09 -0400 Message-ID: <558D640C.2020907@redhat.com> Date: Fri, 26 Jun 2015 14:39:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Patrick Palka CC: "gdb-patches@sourceware.org" Subject: Re: [PATCH] Fix TUI flicker resulting from frequent frame changes (PR tui/13378) References: <1434688566-2549-1-git-send-email-patrick@parcs.ath.cx> <558D5562.5090106@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-06/txt/msg00576.txt.bz2 On 06/26/2015 03:09 PM, Patrick Palka wrote: > On Fri, Jun 26, 2015 at 9:36 AM, Pedro Alves wrote: >> How about we instead find some more higher level place >> to refresh? I'm thinking that maybe whenever we display the prompt >> might be a good place (before_prompt observer). With both the prompt >> and normal_stop, we cover every case that needs a refresh, I think. > > I can imagine a problem with this. It seems that when the screen gets > refreshed following a frame change, any scrolling that the user did in > the source/asm windows would get undone because the screen gets > re-centered on the currently executing line. You can see this by > doing "frame 0", scrolling the window a bit and doing "frame 0" again: > the scrolling gets undone. So by naively refreshing the source/asm > windows before each prompt, we would undo scrolling for benign > commands such as "print 1 + 2", "bt", I think... Indeed. > This could be fixed > by being smarter about refreshing, by only refreshing the screen in > the before_prompt observer if the frame information/PC has changed. ... > It seems it would be better to only refresh the screen if the > frame/PC actually changes as mentioned above. This can be checked in > the observer itself -- no need for the hook, right? Yes, I think so. Thanks, Pedro Alves