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
+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>:
2019-11-10 Tom Tromey <tom@tromey.com>
* cli/cli-style.h (class cli_style_option) <cli_style_option>:
tui_cmd_window ()
: tui_win_info (CMD_WIN)
{
tui_cmd_window ()
: tui_win_info (CMD_WIN)
{
}
DISABLE_COPY_AND_ASSIGN (tui_cmd_window);
}
DISABLE_COPY_AND_ASSIGN (tui_cmd_window);
/* Window title to display. */
std::string title;
/* 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;
};
/* Is this window highlighted? */
bool is_highlighted = false;
};
tui_unhighlight_win (struct tui_win_info *win_info)
{
if (win_info != NULL
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);
&& win_info->handle != NULL)
{
box_win (win_info, false);
tui_highlight_win (struct tui_win_info *win_info)
{
if (win_info != NULL
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);
&& win_info->handle != NULL)
{
box_win (win_info, true);
void
tui_win_info::check_and_display_highlight_if_needed ()
{
void
tui_win_info::check_and_display_highlight_if_needed ()
{
{
if (is_highlighted)
tui_highlight_win (this);
{
if (is_highlighted)
tui_highlight_win (this);