From patchwork Sun Jun 23 22:43:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 33327 Received: (qmail 62318 invoked by alias); 23 Jun 2019 23:26:34 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 62262 invoked by uid 89); 23 Jun 2019 23:26:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1465, 1087 X-HELO: gateway22.websitewelcome.com Received: from gateway22.websitewelcome.com (HELO gateway22.websitewelcome.com) (192.185.46.156) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 23 Jun 2019 23:26:32 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway22.websitewelcome.com (Postfix) with ESMTP id 51C9F57EF for ; Sun, 23 Jun 2019 18:26:31 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id fBsVhwzesdnCefBsVhX8az; Sun, 23 Jun 2019 18:26:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=KR1LrhyxmHkocsw0tz7wIZjCrB0PW5lFg13kmj5sH7Q=; b=mbN42r6fB2PfUvCkiOYV5xyoDP 98JV1nmTqD44VbLCQbLChIwfz3u92JwbHI7XUp8nlN4f/RXBya2F2s00i/vF9dcJSpnwRF0NSZNb9 DDl1GwZZFKeLP0Iycq4gHaBBq; Received: from 75-166-12-78.hlrn.qwest.net ([75.166.12.78]:54396 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hfBDD-000vDQ-0c; Sun, 23 Jun 2019 17:43:51 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 47/66] Don't check window type in tui_set_win_focus_to Date: Sun, 23 Jun 2019 16:43:10 -0600 Message-Id: <20190623224329.16060-48-tom@tromey.com> In-Reply-To: <20190623224329.16060-1-tom@tromey.com> References: <20190623224329.16060-1-tom@tromey.com> 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. 2019-06-23 Tom Tromey * tui/tui-win.c (tui_set_win_focus_to): Don't check window type. * tui/tui-wingeneral.c (tui_unhighlight_win): Check can_highlight. --- 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/tui/tui-win.c b/gdb/tui/tui-win.c index 2ca3d086c98..61b3a3251f1 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 cfa4a08701c..98eb5abde16 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);