public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Patrick Palka <patrick@parcs.ath.cx>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix a pair of screen-resizing issues in TUI
Date: Tue, 10 Feb 2015 17:27:00 -0000	[thread overview]
Message-ID: <54DA3F68.4040107@redhat.com> (raw)
In-Reply-To: <1420861759-10700-1-git-send-email-patrick@parcs.ath.cx>

On 01/10/2015 03:49 AM, Patrick Palka wrote:
> This patch fixes a pair of TUI issues related to screen resizing:
> 
> 1. In tui_handle_resize_during_io(), when the TUI screen gets resized,
> we fail to update GDB's idea about the height of the output window.
> 
> You can see this bug by doing:
> 
>   a. Enter TUI mode.
>   b. "show height"
>   c. Resize the terminal.
>   d. "show height"
> 
> And observe that despite resizing the terminal, the reported height
> remains unchanged.  Note that a similar issue exists in the CLI.
> 
> The fix for this is simple: call tui_update_gdb_sizes() after performing
> a resize, so that the "height" variable remains consistent with the
> height of TUI's output window.
> 
> 2. In tui_enable(), the call to tui_update_gdb_sizes() may clobber
> readline's idea of the actual screen dimensions, and a subsequent
> pending resize will use bogus terminal dimensions.
> 
> You can see this bug by doing:
> 
>   a. Enter TUI mode.
>   b. Exit TUI mode.
>   c. Resize the terminal.
>   d. Enter TUI mode.
>   e. Press a key to resize the screen.
> 
> And observe that the terminal gets incorrectly resized to the wrong
> dimensions.  To fix this issue, we should oppurtunistically resize the
> screen in tui_enable().  That way we eliminate the possibility of a
> pending resize triggering right after we call tui_update_gdb_sizes().
> 
> gdb/ChangeLog:
> 
> 	* tui/tui-io.c (tui_handle_resize_during_io): Call
> 	tui_update_gdb_sizes() after resizing the screen.
> 	* tui/tui.c (tui_enable): Resize the terminal before
> 	calling tui_update_gdb_sizes().

OK.

Thanks!

-- 
Pedro Alves

      parent reply	other threads:[~2015-02-10 17:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-10  3:49 Patrick Palka
2015-01-10  3:49 ` [PATCH] Fix truncation of TUI command history Patrick Palka
2015-01-10  3:59   ` Patrick Palka
2015-01-27  2:13   ` Patrick Palka
2015-02-04 14:50     ` Patrick Palka
2015-02-10 17:30   ` Pedro Alves
2015-01-10  3:56 ` [PATCH] Fix a pair of screen-resizing issues in TUI Patrick Palka
2015-01-26 21:55 ` Patrick Palka
2015-02-04 14:49   ` Patrick Palka
2015-02-10 17:27 ` 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=54DA3F68.4040107@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).