public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PING] [PATCH 2/4] Return true in TuiWindow.is_valid only if TUI is enabled
       [not found] <2083445682.3638774.1610640888364.ref@mail.yahoo.com>
@ 2021-01-14 16:14 ` Hannes Domani
  2021-01-15 16:49   ` Andrew Burgess
  0 siblings, 1 reply; 2+ messages in thread
From: Hannes Domani @ 2021-01-14 16:14 UTC (permalink / raw)
  To: gdb-patches, Tom Tromey, Simon Marchi

Ping.


Am Donnerstag, 31. Dezember 2020, 05:24:32 MEZ hat Simon Marchi <simon.marchi@polymtl.ca> Folgendes geschrieben:

> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PING] [PATCH 2/4] Return true in TuiWindow.is_valid only if TUI is enabled
  2021-01-14 16:14 ` [PING] [PATCH 2/4] Return true in TuiWindow.is_valid only if TUI is enabled Hannes Domani
@ 2021-01-15 16:49   ` Andrew Burgess
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Burgess @ 2021-01-15 16:49 UTC (permalink / raw)
  To: Hannes Domani; +Cc: gdb-patches, Tom Tromey, Simon Marchi

* Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> [2021-01-14 16:14:48 +0000]:

> Ping.

I replied to the original thread:

  https://sourceware.org/pipermail/gdb-patches/2021-January/175122.html

Thanks,
Andrew


> 
> 
> Am Donnerstag, 31. Dezember 2020, 05:24:32 MEZ hat Simon Marchi <simon.marchi@polymtl.ca> Folgendes geschrieben:
> 
> > 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-15 16:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <2083445682.3638774.1610640888364.ref@mail.yahoo.com>
2021-01-14 16:14 ` [PING] [PATCH 2/4] Return true in TuiWindow.is_valid only if TUI is enabled Hannes Domani
2021-01-15 16:49   ` Andrew Burgess

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).