From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#59351: 29.0.50; [PATCH] Fix mouse click position to menu bar entry Date: Fri, 18 Nov 2022 21:23:09 +0800 Message-ID: <87r0y0cs76.fsf@yahoo.com> References: <87tu2wlku7.fsf@elite.giraud> <878rk8ee6d.fsf@yahoo.com> <8735agr0g4.fsf@elite.giraud> <83o7t4bhk4.fsf@gnu.org> <87h6ywwj9e.fsf@elite.giraud> <83edu0bg4w.fsf@gnu.org> <87cz9kwi2y.fsf@elite.giraud> <838rk8bf36.fsf@gnu.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26017"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 59351@debbugs.gnu.org, Manuel Giraud To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 18 14:24:17 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 1ow1Lt-0006b7-73 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Nov 2022 14:24:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ow1Lf-00034r-Ib; Fri, 18 Nov 2022 08:24:03 -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 1ow1Le-00034T-F2 for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 08:24:02 -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 1ow1Le-0008ML-6e for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 08:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ow1Le-0003KR-19 for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 08:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 13:24:01 +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.166877780812753 (code B ref 59351); Fri, 18 Nov 2022 13:24:01 +0000 Original-Received: (at 59351) by debbugs.gnu.org; 18 Nov 2022 13:23:28 +0000 Original-Received: from localhost ([127.0.0.1]:35775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow1L6-0003Jc-5S for submit@debbugs.gnu.org; Fri, 18 Nov 2022 08:23:28 -0500 Original-Received: from sonic311-23.consmr.mail.ne1.yahoo.com ([66.163.188.204]:43850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow1L3-0003JP-K0 for 59351@debbugs.gnu.org; Fri, 18 Nov 2022 08:23:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1668777799; bh=ipD0EvqivhCgOmHlaFJX0M2BesrqFp6TUU0ClFCBKjk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=hTCctriEb6MX6Q/1Nd2BAXHrW3pvv/HZK4c8li3W8AcvACfOOaft8cRW2q6iQY8PS7UBqjKPwVBIETn6Uzq0WHo20kpeeccijQ4ELZUtFKuK/B82Z3m8bGn1Rm7YVBvDIInnzxJfp3SC0U6sFJXWX/1Pmas/C/eynl5By4KwZrP036A9/jCF7g1Av9inNVxoKmS1JIImp7EScHj5vXJUeljTJHAWKU7ZvUhL4YUpqTrdEl/nF5N+OCuHWAPtoQBHPcV5CAcP0qWjFkZbkaScKouEUU/4WnmAOaKnCtOVwyYHE8ZOfeOGcrzU4kh+fXk6VqvrtRc/gWP03avAPD56EA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1668777799; bh=jdQ5f+CbpyYxLsvK4ILHZgxnq/3E5zLBgnO2cshNSs/=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=FzzEsKoKR387TXwdxiT8TO16o7/syaA01R9O9BESFPqAWbE1WRe1QwQEP+ZtZ3dagGC9Yvl2nXIC7h538b3DcTkfHbOk5DsbFElCia/eFYzfojbOAssH5QLLgGoUyy81gDXNwtV3BRdEIHX3qlmWAIszcDLOc8+B/NybQYLDaZoqW7hrS5f43VazGh307huB+uifm6tLvM1JHVj1SOnn0sJ+zY6K/my2YJkU4oEWrBVpDt3cNOJDsLm+SLm9rs/ikkUS166d6s8SjNeAShk7D7pqFgjtQTlBQolB5hjtHpbCCybB4vjn6kYXrfFsYzH6l+t5FDvHPDotz8dq08zhzA== X-YMail-OSG: vQB39AsVM1lZnWusHP1ZsWT9m980Y8uKjV3.rLC1WbpZmtHaAnBbmNu6wAlAlar N31cRXZy0rQsLPzg0TdUh2y1NOnETwnua4j2nZuyW044tDjPWQYtNFf5NNvLppQ8.vLDPMqfMmCz icdWGWo.rebQLQIzH3UX2YoQwB3gsozuomkh9GElZxSyA7wuywVUCsd_T7nHotD0UnZ2PqtlyWqt BKWvuesOwl97KZM2.TUW3jWXsbru8hA8vFfQOhN08kbf7tyO6adnh1pEaQvCLYcRmAiJscGpOXgC CIbVAFNnpAD8_oxpEpnbWtDdwrii_tWoIgNurXD8QvHoBYyjmZJ8wFrBBoSIm38jQt9x92b_A12z 0R5Lprbn91.a.KOkQDZo1kEEU7xn5Wm3RiF4Tgvjd02maMcXqShl_GsJBtCq0RmyGf1uVKb35EM. ZnleH9iyy9r.GDtqLsoxULwRN0i9Q_ljP7Y4oiYoSgT5QZ3ueLpqeJ16lpYnPiimLzvJnaIFlFyM 7DRtlnx7Pxt4lTUNCPfWltXa_OoCp5d2GG7S_Qrnnl.QoLl1ufhVDW1tETGXXlqa8Jqm6GL80efC 3dBuW2O9TCs1rsSqNyCsjes5PDAz7jfgTwhX0kU_Am9z0xU8UET7aNAVnCAEK1puV_TemN58DjpY 1zZOZsN6ozHw.J5xeqcG6T1ayyZKSPWozh7rObUEbdkKkTNy4d3Vu4QXJWllkDj95eQwgtMxAvt5 SS8a7l6B5rX8rWl7savBTKoNfQ3W4WnLa8LPYl2BsDSK74Gg8zgbuPYmyLTDNk53WUL1h_EZ5M6K BNqJyQeOTZ69xoeEBce_mPta8Z13JWpVzJB3EM0Dbl X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ne1.yahoo.com with HTTP; Fri, 18 Nov 2022 13:23:19 +0000 Original-Received: by hermes--production-sg3-6c8895b545-phbzr (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID a89b456252f4edde66870d4905608b4f; Fri, 18 Nov 2022 13:23:14 +0000 (UTC) In-Reply-To: <838rk8bf36.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 18 Nov 2022 14:51:41 +0200") X-Mailer: WebService/1.1.20863 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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:248234 Archived-At: Eli Zaretskii writes: >> From: Manuel Giraud >> Cc: luangruo@yahoo.com, 59351@debbugs.gnu.org >> Date: Fri, 18 Nov 2022 13:41:25 +0100 >> >> Eli Zaretskii writes: >> >> [...] >> >> > When you click on the menu bar, Emacs drops down a menu, right? For >> > example, if you click on "File", you will see a menu with items like >> > "Visit New File...", "Open File..." etc. After that, if you click in >> > the dropped-down menu, is the code you suggest to modify involved, and >> > if so, does the conversion from X/Y to COL/ROW still work? >> >> Po could correct me but I do not think that this code is involved here. >> I think that when *into* the menu most things are done by the oldXmenu >> library. > > Possibly. It's been a while since I looked at that code and debugged > it. Please see my other reply. The pseudo-window is changed when a menu bar is activated on a TTY with a mouse, but not under X, where the XMenu library is used to display the menu. Since the proposed code only makes a difference on terminals with variable-width fonts, my suggestion is to use it only on X terminals, whilst letting the TTY menu bar operate as before.