public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Don't check window type in tui_set_win_focus_to
@ 2019-06-25 14:02 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2019-06-25 14:02 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bbc228ee056cd006e971d5f1cb70ae0f69c1eb36

commit bbc228ee056cd006e971d5f1cb70ae0f69c1eb36
Author: Tom Tromey <tom@tromey.com>
Date:   Thu Jun 20 15:22:53 2019 -0600

    Don't check window type in tui_set_win_focus_to
    
    This changes tui_set_win_focus_to so that it no longer checks the
    window type.  Instead, now tui_unhighlight_win also checks whether the
    window can be highlighted.
    
    gdb/ChangeLog
    2019-06-25  Tom Tromey  <tom@tromey.com>
    
    	* tui/tui-win.c (tui_set_win_focus_to): Don't check window type.
    	* tui/tui-wingeneral.c (tui_unhighlight_win): Check
    	can_highlight.

Diff:
---
 gdb/ChangeLog            | 6 ++++++
 gdb/tui/tui-win.c        | 7 ++-----
 gdb/tui/tui-wingeneral.c | 1 +
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bd8af64..48cfc36 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
 2019-06-25  Tom Tromey  <tom@tromey.com>
 
+	* tui/tui-win.c (tui_set_win_focus_to): Don't check window type.
+	* tui/tui-wingeneral.c (tui_unhighlight_win): Check
+	can_highlight.
+
+2019-06-25  Tom Tromey  <tom@tromey.com>
+
 	* tui/tui-win.c (tui_source_window_base::update_tab_width): Call
 	make_visible_with_new_height method.
 	(tui_win_info::make_visible_with_new_height): New method.
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index 5ba6836..b2eb0a6 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -458,12 +458,9 @@ tui_set_win_focus_to (struct tui_win_info *win_info)
     {
       struct tui_win_info *win_with_focus = tui_win_with_focus ();
 
-      if (win_with_focus != NULL
-	  && win_with_focus->type != CMD_WIN)
-	tui_unhighlight_win (win_with_focus);
+      tui_unhighlight_win (win_with_focus);
       tui_set_win_with_focus (win_info);
-      if (win_info->type != CMD_WIN)
-	tui_highlight_win (win_info);
+      tui_highlight_win (win_info);
     }
 }
 
diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c
index cfa4a08..98eb5ab 100644
--- a/gdb/tui/tui-wingeneral.c
+++ b/gdb/tui/tui-wingeneral.c
@@ -108,6 +108,7 @@ void
 tui_unhighlight_win (struct tui_win_info *win_info)
 {
   if (win_info != NULL 
+      && win_info->can_highlight
       && win_info->handle != NULL)
     {
       box_win (win_info, NO_HILITE);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-25 14:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25 14:02 [binutils-gdb] Don't check window type in tui_set_win_focus_to Tom Tromey

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