From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud Newsgroups: gmane.emacs.bugs Subject: bug#58406: 29.0.50; Bars refactoring? Date: Mon, 10 Oct 2022 13:58:40 +0200 Message-ID: <871qrfao0f.fsf@elite.giraud> References: <87a6641648.fsf@elite.giraud> <83y1togj84.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4488"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 58406@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 10 13:59:12 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ohrRA-0000vd-57 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Oct 2022 13:59:12 +0200 Original-Received: from localhost ([::1]:49744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohrR8-0004Th-Q7 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Oct 2022 07:59:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohrR0-0004TZ-CL for bug-gnu-emacs@gnu.org; Mon, 10 Oct 2022 07:59:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47241) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ohrQz-0005B3-Vi for bug-gnu-emacs@gnu.org; Mon, 10 Oct 2022 07:59:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ohrQz-00024J-QH for bug-gnu-emacs@gnu.org; Mon, 10 Oct 2022 07:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Oct 2022 11:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58406 X-GNU-PR-Package: emacs Original-Received: via spool by 58406-submit@debbugs.gnu.org id=B58406.16654031257928 (code B ref 58406); Mon, 10 Oct 2022 11:59:01 +0000 Original-Received: (at 58406) by debbugs.gnu.org; 10 Oct 2022 11:58:45 +0000 Original-Received: from localhost ([127.0.0.1]:46319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohrQj-00023o-Ab for submit@debbugs.gnu.org; Mon, 10 Oct 2022 07:58:45 -0400 Original-Received: from ledu-giraud.fr ([51.159.28.247]:26488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohrQg-00023f-Li for 58406@debbugs.gnu.org; Mon, 10 Oct 2022 07:58:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=3brJWWZMLgwZ8Svm v3zbgSaXMshh7tDTlyewyrysC/8=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=UGnBJ6WhyJX5hWGQDeyXPUT5aFWRjwjvrRo5mc hJxwGhH1D/NQMK9h0QDT1DKAREgdxgVqEPEMWEzigGgS7MstJdyZ/PXMVqEOAxVLdYR708 Bay7/Q2VmKkgmo4s8qtm0ilVFEh651euiMYMS1VqvRt9pspwoWRUEnDUiawVQuJRmPQ0xw FAx58aAwBh5fomlssVYmjpviqUWJU7AVTc+4qQu1EYxvj73KZTAFlUE+6ORrsb1nr2ak3S FwYySfT+Hujf38hPEY6987L3vs3SEUh1reTCqMK5tYbgsqWrneYNoSj9iNvvEyeD18IYiE SvoMZ6aphvkpdhAUQK34vPRw== Original-Received: from elite.giraud ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 9246b2b9 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 10 Oct 2022 13:58:41 +0200 (CEST) In-Reply-To: <83y1togj84.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 10 Oct 2022 11:45:31 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245012 Archived-At: Eli Zaretskii writes: [...] > The approach is OK, and welcome. But let's please wait with this > refactoring until after the emacs-29 branch is cut. OK? Yes. Po Lu made that point clear too. [...] > The "F->tool_bar_items" part of the comment is outdated. > > Also, our style is to leave two spaces between sentences in comments > and documentation. [...] > Likewise here: outdated reference to tool_bar_items. Yes. Sorry to have wasted your time: this patch is far from clean (and it shows in comment and the like). It was really just to show my direction. >> + /* Is mouse on the highlighted item? */ >> + if (bar =3D=3D TAB_BAR) >> + return *prop_idx =3D=3D f->last_tab_bar_item ? 0 : 1; >> + else if (EQ (window, hlinfo->mouse_face_window) >> + && *vpos >=3D hlinfo->mouse_face_beg_row >> + && *vpos <=3D hlinfo->mouse_face_end_row >> + && (*vpos > hlinfo->mouse_face_beg_row >> + || *hpos >=3D hlinfo->mouse_face_beg_col) >> + && (*vpos < hlinfo->mouse_face_end_row >> + || *hpos < hlinfo->mouse_face_end_col >> + || hlinfo->mouse_face_past_end)) >> + return 0; > > The "else if" clause should only be used for the tool bar, not for the > menu bar, AFAIU. I don't know yet =F0=9F=98=85 >> @@ -15485,6 +15451,7 @@ handle_tool_bar_click_with_device (struct frame = *f, int x, int y, bool down_p, >> Mouse_HLInfo *hlinfo =3D MOUSE_HL_INFO (f); >> struct window *w =3D XWINDOW (f->tool_bar_window); >> int hpos, vpos, prop_idx; >> + bool close_p; > > The value of this is ignored here, so it is better to call this > variable 'ignored' or 'dummy' or something to that effect. Yes it is a good idea. I'll try to remember that next time. --=20 Manuel Giraud