public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net
To: gdb-testers@sourceware.org
Subject: [binutils-gdb] Remove can_highlight from TUI windows
Date: Sun, 10 Nov 2019 18:21:00 -0000	[thread overview]
Message-ID: <0b026263ea17155b57f7763901894be2cbb6c3ff@gdb-build> (raw)

*** TEST RESULTS FOR COMMIT 0b026263ea17155b57f7763901894be2cbb6c3ff ***

commit 0b026263ea17155b57f7763901894be2cbb6c3ff
Author:     Tom Tromey <tom@tromey.com>
AuthorDate: Sun Nov 10 10:33:07 2019 -0700
Commit:     Tom Tromey <tom@tromey.com>
CommitDate: Sun Nov 10 10:33:07 2019 -0700

    Remove can_highlight from TUI windows
    
    Each TUI window has a "can_highlight" member.  However, this has the
    same meaning as "can_box" -- a window can be highlighted if and only
    if it can be boxed.  So, this patch removes can_highlight in favor of
    simply using can_box.
    
    gdb/ChangeLog
    2019-11-10  Tom Tromey  <tom@tromey.com>
    
            * tui/tui-wingeneral.c (tui_unhighlight_win): Use can_box.
            (tui_highlight_win): Likewise.
            (tui_win_info::check_and_display_highlight_if_needed): Likewise.
            * tui/tui-data.h (struct tui_win_info) <can_highlight>: Remove.
            * tui/tui-command.h (struct tui_cmd_window) <tui_cmd_window>:
            Don't set can_highlight.
    
    Change-Id: I35916859070efcdfcc6e692c71cc6070956dcfce

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bac7f4419e..6f377f3347 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2019-11-10  Tom Tromey  <tom@tromey.com>
+
+	* tui/tui-wingeneral.c (tui_unhighlight_win): Use can_box.
+	(tui_highlight_win): Likewise.
+	(tui_win_info::check_and_display_highlight_if_needed): Likewise.
+	* tui/tui-data.h (struct tui_win_info) <can_highlight>: Remove.
+	* tui/tui-command.h (struct tui_cmd_window) <tui_cmd_window>:
+	Don't set can_highlight.
+
 2019-11-10  Tom Tromey  <tom@tromey.com>
 
 	* cli/cli-style.h (class cli_style_option) <cli_style_option>:
diff --git a/gdb/tui/tui-command.h b/gdb/tui/tui-command.h
index 79516941c9..6a276df72e 100644
--- a/gdb/tui/tui-command.h
+++ b/gdb/tui/tui-command.h
@@ -30,7 +30,6 @@ struct tui_cmd_window : public tui_win_info
   tui_cmd_window ()
     : tui_win_info (CMD_WIN)
   {
-    can_highlight = false;
   }
 
   DISABLE_COPY_AND_ASSIGN (tui_cmd_window);
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 8af15735aa..0e45da5934 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -211,9 +211,6 @@ public:
   /* Window title to display.  */
   std::string title;
 
-  /* Can this window ever be highlighted?  */
-  bool can_highlight = true;
-
   /* Is this window highlighted?  */
   bool is_highlighted = false;
 };
diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c
index b6dd3f9b26..f6a6903306 100644
--- a/gdb/tui/tui-wingeneral.c
+++ b/gdb/tui/tui-wingeneral.c
@@ -84,7 +84,7 @@ void
 tui_unhighlight_win (struct tui_win_info *win_info)
 {
   if (win_info != NULL 
-      && win_info->can_highlight
+      && win_info->can_box ()
       && win_info->handle != NULL)
     {
       box_win (win_info, false);
@@ -98,7 +98,7 @@ void
 tui_highlight_win (struct tui_win_info *win_info)
 {
   if (win_info != NULL
-      && win_info->can_highlight
+      && win_info->can_box ()
       && win_info->handle != NULL)
     {
       box_win (win_info, true);
@@ -110,7 +110,7 @@ tui_highlight_win (struct tui_win_info *win_info)
 void
 tui_win_info::check_and_display_highlight_if_needed ()
 {
-  if (can_highlight)
+  if (can_box ())
     {
       if (is_highlighted)
 	tui_highlight_win (this);


             reply	other threads:[~2019-11-10 18:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-10 18:21 gdb-buildbot [this message]
2019-11-10 18:21 ` Failures on Ubuntu-Aarch64-native-gdbserver-m64, branch master gdb-buildbot
2019-11-25 15:41 ` Failures on Fedora-i686, " gdb-buildbot
2019-11-25 15:59 ` Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot
2019-11-25 16:09 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
2019-11-25 16:20 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
2019-11-25 16:46 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot

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=0b026263ea17155b57f7763901894be2cbb6c3ff@gdb-build \
    --to=gdb-buildbot@sergiodj.net \
    --cc=gdb-testers@sourceware.org \
    /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).