From: Pedro Alves <palves@redhat.com>
To: Patrick Palka <patrick@parcs.ath.cx>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix TUI flicker resulting from frequent frame changes (PR tui/13378)
Date: Fri, 26 Jun 2015 14:39:00 -0000 [thread overview]
Message-ID: <558D640C.2020907@redhat.com> (raw)
In-Reply-To: <CA+C-WL80ZAEB2TuJ7XJ_AiOsmO67=2rWy+STFZa5+HJjsoDw1Q@mail.gmail.com>
On 06/26/2015 03:09 PM, Patrick Palka wrote:
> On Fri, Jun 26, 2015 at 9:36 AM, Pedro Alves <palves@redhat.com> 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
prev parent reply other threads:[~2015-06-26 14:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-19 4:36 Patrick Palka
2015-06-19 17:13 ` Patrick Palka
2015-06-26 3:16 ` Patrick Palka
2015-06-26 13:36 ` Pedro Alves
2015-06-26 14:10 ` Patrick Palka
2015-06-26 14:39 ` Pedro Alves [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=558D640C.2020907@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=patrick@parcs.ath.cx \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox