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.devel Subject: Re: Mouse information in xterm. Date: Mon, 14 Sep 2020 21:56:37 +0300 Message-ID: <83a6xs9ogq.fsf@gnu.org> References: <20200914113816.562wa5cwqxdtwnmy.ref@Ergus> <20200914113816.562wa5cwqxdtwnmy@Ergus> <83r1r49yc2.fsf@gnu.org> <20200914162710.c2ic5szp34tvwtib@Ergus> <83h7s09s98.fsf@gnu.org> <20200914181311.fd56gqwn4ntytkqn@Ergus> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1833"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 14 20:57:33 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kHtfR-0000Nj-IF for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 20:57:33 +0200 Original-Received: from localhost ([::1]:48258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHtfQ-0007dv-KT for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 14:57:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHteX-0006qC-QX for emacs-devel@gnu.org; Mon, 14 Sep 2020 14:56:37 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58211) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHteX-0001vU-E6; Mon, 14 Sep 2020 14:56:37 -0400 Original-Received: from [176.228.60.248] (port=4951 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kHteT-0002qX-5E; Mon, 14 Sep 2020 14:56:37 -0400 In-Reply-To: <20200914181311.fd56gqwn4ntytkqn@Ergus> (message from Ergus on Mon, 14 Sep 2020 20:13:11 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:255684 Archived-At: > Date: Mon, 14 Sep 2020 20:13:11 +0200 > From: Ergus > Cc: emacs-devel@gnu.org > > When we call x-popup-dialog with t as the first parameter. The function > x_popup_menu_1 tries to get the cursor/mouse position calling > term_mouse_position. (As the documentation says) > > The issue is that term_mouse_position always report (0,0) as the current > position independently of the cursor and mouse actual positions because > it just copies the values in last_mouse_x and last_mouse_y which are > zero because nobody updated them, see. last_mouse_x and last_mouse_y will change only if you use GPM mouse on the terminal. Otherwise, these variables will remain zero on GNU/Linux. So what you see is expected unless you use GPM (do you?). The doc string of x-popup-dialog says that if POSITION is t, then the dialog appears at the center of the selected frame. So what you see is exactly what the documentation says, and I don't understand what is the problem you are trying to solve, or why POSITION being t is important to you, or where you expected or wanted the dialog to pop up or why there. Please elaborate, as I feel we are talking past each other. I see the same on a GUI frame, btw, so I also don't understand what "works as expected in gui" for you. What am I missing?