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 22:14:19 +0800 Message-ID: <87fsegcptw.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> <87r0y0cs76.fsf@yahoo.com> <87h6ywuzi1.fsf@elite.giraud> 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="4932"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 59351@debbugs.gnu.org To: Manuel Giraud Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 18 15:15: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 1ow29A-0000v1-WC for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Nov 2022 15:15:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ow291-0006JI-PG; Fri, 18 Nov 2022 09:15: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 1ow290-0006J7-Qy for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 09:15: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 1ow290-00005G-HX for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 09:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ow290-0000ja-DN for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 09:15: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 14:15: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.16687808822770 (code B ref 59351); Fri, 18 Nov 2022 14:15:02 +0000 Original-Received: (at 59351) by debbugs.gnu.org; 18 Nov 2022 14:14:42 +0000 Original-Received: from localhost ([127.0.0.1]:35914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow28g-0000ic-C0 for submit@debbugs.gnu.org; Fri, 18 Nov 2022 09:14:42 -0500 Original-Received: from sonic306-21.consmr.mail.ne1.yahoo.com ([66.163.189.83]:45994) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow28e-0000iN-4R for 59351@debbugs.gnu.org; Fri, 18 Nov 2022 09:14:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1668780874; bh=bBaS9hjqj0VKWXR3xGjj0TN4CQ7d/LTaVf/w9/NM9TA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From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a8tsb05Gk.nYv1OzxGGE Rw.ctjgHlKnTLn0H3UxBu6GwHYHepz7tZXgZj8E48tPdRD9dHCudcIfm15bXW8Zv0VQRq7faBMgk QY7NIjvjybePmRZSW1QinJYHQGhXUustym0.EqTuqu5uTsn7V2rCJItWtDZ_lSixtKCDTn0fghEG 5EpmbQRCPdBy50yqhnmiCi2rDuK_QxTnXwWHE5BS_nQZsoMwIkDRckwhDgjgCY5NazhLUfoIA8B7 aOVyOJENw.PMyajSKIi0NjlDJIIoYBbYBixKbNdOn6oSRNkuV0ztWDWbCc4JWxihHelQkIqFG3rV 32Wx58Tw.Z8iIOfsU_kFO4BHUHb0860gETZzjrDXm9HyN3oWtTLM3cDjSPi0F7Co6zMkXUvzfqVH JDX7xb7ufdBjXE0YiX7dV8DQr5w6eIbWoPVtp6tsdkSjhCdStNoPQerJNpUoCWRODwhMQJu65pGI ZOZZDb26ySk6geQzygDNYX22CAIrNyEvtJxs_HYy7qhf7LdpLs44a3WgcmHRqOgU39zVZT2ifwu9 So7TJErbqzaXBJyldhO1NChl3MTlAWezL.WCuaSNs3aNsM6CxHrVLH7RtZTEajKoW2ZBRKTPY9xi ORt8jMODNWHM_o0PMpSJcNL8vwdhCIYJfh0qnTVSRZ X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Fri, 18 Nov 2022 14:14:34 +0000 Original-Received: by hermes--production-sg3-6c8895b545-xbfp8 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 94787c5a57433bfc24f7873b5c737788; Fri, 18 Nov 2022 14:14:29 +0000 (UTC) In-Reply-To: <87h6ywuzi1.fsf@elite.giraud> (Manuel Giraud's message of "Fri, 18 Nov 2022 15:08:06 +0100") 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:248240 Archived-At: Manuel Giraud writes: > +#if defined HAVE_WINDOW_SYSTEM > + struct window *menu_w = XWINDOW (f->menu_bar_window); > + int x, y, dummy; > + > + x = FRAME_TO_WINDOW_PIXEL_X (menu_w, XFIXNUM (event->x)); > + y = FRAME_TO_WINDOW_PIXEL_Y (menu_w, XFIXNUM (event->y)); > + > + x_y_to_hpos_vpos (XWINDOW (f->menu_bar_window), x, y, &column, &row, > + NULL, NULL, &dummy); > +#else Builds with X can still create TTY frames!