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#59351: 29.0.50; [PATCH] Fix mouse click position to menu bar entry Date: Thu, 24 Nov 2022 14:49:52 +0100 Message-ID: <87wn7k5unz.fsf@elite.giraud> References: <87tu2wlku7.fsf@elite.giraud> <878rk8ee6d.fsf@yahoo.com> <8735agr0g4.fsf@elite.giraud> <83o7t4bhk4.fsf@gnu.org> <87zgcov1ps.fsf@elite.giraud> <8335agbai5.fsf@gnu.org> <875yfcuw5r.fsf@elite.giraud> <83r0y09td6.fsf@gnu.org> <87zgcotbw9.fsf@elite.giraud> <83iljc9k5s.fsf@gnu.org> <871qpt7hac.fsf@elite.giraud> <83y1s1y3vg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33480"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: luangruo@yahoo.com, 59351@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 24 14:51:04 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 1oyCd6-0008VH-3r for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Nov 2022 14:51:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyCcS-0000NB-Po; Thu, 24 Nov 2022 08:50:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyCcG-0000Jo-V9 for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 08:50:14 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oyCc6-0000ST-LJ for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 08:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oyCc6-0005PH-8F for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 08:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Nov 2022 13:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59351 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59351-submit@debbugs.gnu.org id=B59351.166929779720768 (code B ref 59351); Thu, 24 Nov 2022 13:50:02 +0000 Original-Received: (at 59351) by debbugs.gnu.org; 24 Nov 2022 13:49:57 +0000 Original-Received: from localhost ([127.0.0.1]:57751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyCc1-0005Ou-3h for submit@debbugs.gnu.org; Thu, 24 Nov 2022 08:49:57 -0500 Original-Received: from ledu-giraud.fr ([51.159.28.247]:14408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyCby-0005Ol-Pi for 59351@debbugs.gnu.org; Thu, 24 Nov 2022 08:49:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=eUdX3sj6fJOzWzkV G1rVn+xtUodR9D+IkGi3+58Nfwg=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=r7kKq9C+p64VVo9GSrflxul6TifbU3zobsqxjP /ngPNDghKv63s/vefoy8u8QddVYjlvRUb9vRXOS6Az/8LMXNTiM1RjW1iR2d3ZQwPeaFEd O1J8fMCiVspeicULiZgLobzOtkVw/a8ewe2gVRUxwOZq2EmRwsptlr+sqfd336Kgb0NsWF sbxP6LpkfzCwtCmC3ej6ViT356MDEhSN871kgC6Rm+9peuQwWGv+16CA9cb2fQfnggj+D6 LXAzFBm60um9zDaVDZtl+aAAENWsiHq5Eyy8HL//0JvXKM1y0SDFU6O1CeSoaP7lzhsI4S Oyds42IfeJ9DfOW60PNMaIVg== Original-Received: from elite.giraud ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 50b859e6 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 24 Nov 2022 14:49:53 +0100 (CET) In-Reply-To: <83y1s1y3vg.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 23 Nov 2022 19:31:15 +0200") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248865 Archived-At: Eli Zaretskii writes: [...] > Why do you think row->visible_height plays any role in this? Maybe I'm > missing something, but it looks like it has nothing to do with the > non-resizing of the menu bar. Yes. I think that I was misled by the name. [...] > What I think we need to do is something like this: > > /* Compute the total height of the lines. */ > compute_line_metrics (&it); > if (FRAME_WINDOW_P (it.f)) > { > struct glyph_row *row = it.glyph_row; > if (row->y + row->height > WINDOW_BOX_HEIGHT_NO_MODE_LINE (w)) > { > FRAME_MENU_BAR_HEIGHT (it.f) = it.row->height; > it.f->fonts_changed = true; > } > } > > I hope that setting the frame's fonts_changed flag will cause Emacs resize > the menu-bar window. You should see a call to adjust_frame_glyphs from > redisplay_internal; if that doesn't happen, perhaps we should force such a > call right after display_menu_bar returns. Can you try this? Ok. I'll try this and report. Thanks. -- Manuel Giraud