From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59351: 29.0.50; [PATCH] Fix mouse click position to menu bar entry Date: Fri, 18 Nov 2022 15:19:18 +0200 Message-ID: <837czsbdt5.fsf@gnu.org> References: <87tu2wlku7.fsf@elite.giraud> <878rk8ee6d.fsf@yahoo.com> <8735agr0g4.fsf@elite.giraud> <874juwebfr.fsf@yahoo.com> <87pmdkwjj4.fsf@elite.giraud> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5054"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 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 14:20: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 1ow1I0-00016O-JP for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Nov 2022 14:20:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ow1Ho-0002H7-6l; Fri, 18 Nov 2022 08:20:04 -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 1ow1Hm-0002Gw-SD for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 08:20: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 1ow1Hm-0007iK-HC for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 08:20:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ow1Hm-0003D5-DH for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 08:20:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 13:20: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.166877756412288 (code B ref 59351); Fri, 18 Nov 2022 13:20:02 +0000 Original-Received: (at 59351) by debbugs.gnu.org; 18 Nov 2022 13:19:24 +0000 Original-Received: from localhost ([127.0.0.1]:35755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow1H9-0003C8-RB for submit@debbugs.gnu.org; Fri, 18 Nov 2022 08:19:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60144) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow1H7-0003Bu-Vf for 59351@debbugs.gnu.org; Fri, 18 Nov 2022 08:19:22 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ow1H2-0007dK-Mn; Fri, 18 Nov 2022 08:19:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Tl2T5EZJWN4dWVfOQuh1JOBo+00hQhIQ6dQBGfwXHvI=; b=B//w70iz3oFT 92oVfCUB0q+esqJK5lFEfH+0WVW5bG+FmCoDLzhrT35CpFREic2gwJsS6x8gW3t14YkKBV2m18AIF 0KrLIfV5TZ/KaX3M9ak++QLWzvSbIeJXDYU9ceUPhr5Bh+YMKdHvwvqcsW8UF9FhL/TjL+q+VmxA5 vC+B+A27ZJIBOMMwkLEyyjx5wnGP9gPeiff+MKdNmhGx9ltu9rrygxF8rgLnLmw6q6B1EpKs3V3Ze 3tKgWc8Eqwmmk3Ov3fwJOI/4g4ab9iZ3fTNZnigzMUWma9U7Hn3ryQVQlXr60MJOv+Z6q8oBk3yn+ N6JZSNGcvw5RzTOLpClO1A==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ow1H1-00049N-T6; Fri, 18 Nov 2022 08:19:16 -0500 In-Reply-To: <87pmdkwjj4.fsf@elite.giraud> (message from Manuel Giraud on Fri, 18 Nov 2022 13:10:07 +0100) 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:248231 Archived-At: > Cc: 59351@debbugs.gnu.org > From: Manuel Giraud > Date: Fri, 18 Nov 2022 13:10:07 +0100 > > Po Lu writes: > > >> + /* I guess this works because the menu bar is always > >> + at position (0, 0) in a frame. Should this changed > >> + and we need a way to calculate the correct position > >> + into the menu bar from the position of the event in > >> + the frame. */ > > > > I think this comment is unnecessary. Where else would a menu bar be? > > I don't know. Maybe in some distant future, menu bar will be anywhere > :-) It also helps with the previous comment about event position being > relative to frame because here we are converting in f->menu_bar_window. Why not use FRAME_TO_WINDOW_PIXEL_X and FRAME_TO_WINDOW_PIXEL_Y, and make sure this will _always_ work?