From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 91893 invoked by alias); 15 Aug 2019 19:38:23 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 91883 invoked by uid 89); 15 Aug 2019 19:38:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Google-Smtp-Source:APXvYqx X-HELO: mail-wr1-f65.google.com Received: from mail-wr1-f65.google.com (HELO mail-wr1-f65.google.com) (209.85.221.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 Aug 2019 19:38:21 +0000 Received: by mail-wr1-f65.google.com with SMTP id r3so3233280wrt.3 for ; Thu, 15 Aug 2019 12:38:21 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:56ee:75ff:fe8d:232b? ([2001:8a0:f913:f700:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id r16sm7345605wrc.81.2019.08.15.12.38.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Aug 2019 12:38:18 -0700 (PDT) Subject: Re: [PATCH] TUI resize unification To: Tom Tromey , gdb-patches@sourceware.org References: <20190815192244.17786-1-tom@tromey.com> From: Pedro Alves Message-ID: <4d73b055-500f-e6e2-25b9-19db01efcc8b@redhat.com> Date: Thu, 15 Aug 2019 19:38:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190815192244.17786-1-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-08/txt/msg00351.txt.bz2 On 8/15/19 8:22 PM, Tom Tromey wrote: > The TUI currently has two different ways to resize a window: the > resize method, and the methods make_invisible_and_set_new_height and > make_visible_with_new_height. > > There's no deep reason to have two different ways to resize a window, > so this patch unifies them, leaving just the "resize" method. > > This also changes the locator to be handled more like an ordinary > window and less like an adjunct of the associated source window. > > gdb/ChangeLog > 2019-08-15 Tom Tromey > > * tui/tui-io.c (tui_puts_internal): Check TUI_CMD_WIN before > calling update_cmdwin_start_line. > * tui/tui-winsource.h (struct tui_source_window_base) > : Don't declare. > : Declare. > * tui/tui-winsource.c (tui_source_window_base::update_tab_width): > Call rerender. > (tui_source_window_base::set_new_height): Remove. > (tui_source_window_base::rerender): Rename from > do_make_visible_with_new_height. > * tui/tui-win.c (tui_resize_all, tui_adjust_win_heights): Use > resize method. > (tui_win_info::make_invisible_and_set_new_height) > (tui_win_info::make_visible_with_new_height): Remove. > * tui/tui-stack.h (struct tui_locator_window) : > Declare. > * tui/tui-stack.c (tui_locator_window::rerender): New method. > * tui/tui-regs.h (struct tui_data_window) do_make_visible_with_new_height>: Don't declare. > : Declare. > * tui/tui-regs.c (tui_data_window::rerender): Rename from > set_new_height. > (tui_data_window::do_make_visible_with_new_height): Remove. > * tui/tui-layout.c (show_source_disasm_command, show_data): Don't > call tui_show_locator_content. > (tui_gen_win_info::resize): Call rerender. > (show_source_or_disasm_and_command): Don't call > tui_show_locator_content. > * tui/tui-data.h (struct tui_gen_win_info) : New > method. > (struct tui_win_info) : Declare. > make_visible_with_new_height>: Don't declare. > * tui/tui-data.c (tui_win_list::rerender): New method. > * tui/tui-command.h (struct tui_cmd_window) > : Don't declare. > * tui/tui-command.c > (tui_cmd_window::do_make_visible_with_new_height): Remove. > > gdb/testsuite/ChangeLog > 2019-08-15 Tom Tromey > > * gdb.tui/empty.exp: Enable resizing tests. Looks good to me. Thanks, Pedro Alves