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 22:14:15 +0300 Message-ID: <838sdc9nnc.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> <83a6xs9ogq.fsf@gnu.org> <20200914190453.wcnptz344vju6msx@Ergus> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36943"; 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 21:14:40 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 1kHtw0-0009TV-3P for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 21:14:40 +0200 Original-Received: from localhost ([::1]:60978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHtvz-0005dR-6p for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 15:14:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHtvY-0005Dn-18 for emacs-devel@gnu.org; Mon, 14 Sep 2020 15:14:12 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58580) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHtvX-0003vN-Jd; Mon, 14 Sep 2020 15:14:11 -0400 Original-Received: from [176.228.60.248] (port=2377 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kHtvW-0007Bu-Ey; Mon, 14 Sep 2020 15:14:11 -0400 In-Reply-To: <20200914190453.wcnptz344vju6msx@Ergus> (message from Ergus on Mon, 14 Sep 2020 21:04:53 +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:255686 Archived-At: > Date: Mon, 14 Sep 2020 21:04:53 +0200 > From: Ergus > Cc: emacs-devel@gnu.org > > On Mon, Sep 14, 2020 at 09:56:37PM +0300, Eli Zaretskii wrote: > >> 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? > > > x-popup-menu manual says: Are we talking about x-popup-menu or x-popup-dialog? You talked about the latter in all your messages. So I'm still confused... > The part of "if the mouse is not available on a text terminal" then > doesn't apply to xterm with xterm-mouse-mode? Indeed, it doesn't. Because AFAIK no one has yet adapted the TTY menus and dialogs to xterm-mouse-mode.