public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Hannes Domani <ssbssa@yahoo.de>,
	gdb-patches@sourceware.org, Tom Tromey <tom@tromey.com>
Subject: Re: [PATCH 2/4] Return true in TuiWindow.is_valid only if TUI is enabled
Date: Wed, 30 Dec 2020 23:24:12 -0500	[thread overview]
Message-ID: <9da77c9f-3256-7eb4-dad9-f1525abeba81@polymtl.ca> (raw)
In-Reply-To: <20201229170227.821-2-ssbssa@yahoo.de>



On 2020-12-29 12:02 p.m., Hannes Domani via Gdb-patches wrote:
> There seems to be no other way to determine if TUI is enabled, which is a
> problem in case the TUI is disabled, and you redraw the window contents
> based on some registered event.
> Then the TUI is redrawn, even though the TUI stays disabled, and the prompt
> is anywhere on the screen.
> 
> gdb/ChangeLog:
> 
> 2020-12-29  Hannes Domani  <ssbssa@yahoo.de>
> 
> 	* python/py-tui.c (gdbpy_tui_is_valid): Check tui_active as well.
> ---
>  gdb/python/py-tui.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gdb/python/py-tui.c b/gdb/python/py-tui.c
> index 87065eaf60..9c35778bcb 100644
> --- a/gdb/python/py-tui.c
> +++ b/gdb/python/py-tui.c
> @@ -356,7 +356,7 @@ gdbpy_tui_is_valid (PyObject *self, PyObject *args)
>  {
>    gdbpy_tui_window *win = (gdbpy_tui_window *) self;
>  
> -  if (win->window != nullptr)
> +  if (tui_active && win->window != nullptr)
>      Py_RETURN_TRUE;
>    Py_RETURN_FALSE;
>  }
> 

I think that makes sense, although I'd like Tom to confirm.

Simon

  reply	other threads:[~2020-12-31  4:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201229170227.821-1-ssbssa.ref@yahoo.de>
2020-12-29 17:02 ` [PATCH 1/4] Fix wrong method name Hannes Domani
2020-12-29 17:02   ` [PATCH 2/4] Return true in TuiWindow.is_valid only if TUI is enabled Hannes Domani
2020-12-31  4:24     ` Simon Marchi [this message]
2021-01-15 16:48     ` Andrew Burgess
2021-01-15 17:22       ` Hannes Domani
2021-01-17 11:31       ` Andrew Burgess
2021-01-17 13:19         ` Hannes Domani
2021-01-18 10:30           ` Andrew Burgess
2021-01-18 11:29             ` Hannes Domani
2021-01-23 17:54           ` Andrew Burgess
2021-01-23 17:55             ` Andrew Burgess
2021-01-24 12:33               ` Hannes Domani
2021-02-06 19:38               ` Tom Tromey
2021-02-08 11:58                 ` Andrew Burgess
2021-02-08 19:19                   ` Tom Tromey
2021-01-18 17:19       ` Eli Zaretskii
2020-12-29 17:02   ` [PATCH 3/4] Add optional styled argument to gdb.execute Hannes Domani
2020-12-29 17:19     ` Eli Zaretskii
2020-12-31  4:28     ` Simon Marchi
2020-12-29 17:02   ` [PATCH 4/4] Fix raw-frame-arguments in combination with frame-filters Hannes Domani
2020-12-31  4:53     ` Simon Marchi
2020-12-31 14:01       ` Hannes Domani
2021-01-31  7:13     ` Joel Brobecker
2020-12-29 17:18   ` [PATCH 1/4] Fix wrong method name Eli Zaretskii
2020-12-29 17:39     ` Hannes Domani

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=9da77c9f-3256-7eb4-dad9-f1525abeba81@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=ssbssa@yahoo.de \
    --cc=tom@tromey.com \
    /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).