From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: Mouse information in xterm. Date: Mon, 14 Sep 2020 18:27:10 +0200 Message-ID: <20200914162710.c2ic5szp34tvwtib@Ergus> References: <20200914113816.562wa5cwqxdtwnmy.ref@Ergus> <20200914113816.562wa5cwqxdtwnmy@Ergus> <83r1r49yc2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34256"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 14 19:35:07 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 1kHsNf-0008nN-FE for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 19:35:07 +0200 Original-Received: from localhost ([::1]:60538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHsNe-00013s-Dr for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 13:35:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHrKC-0007Xg-AY for emacs-devel@gnu.org; Mon, 14 Sep 2020 12:27:28 -0400 Original-Received: from sonic308-2.consmr.mail.bf2.yahoo.com ([74.6.130.41]:44306) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHrK8-0005zS-JM for emacs-devel@gnu.org; Mon, 14 Sep 2020 12:27:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1600100842; bh=akPEsEP/QFfoEUNLrV3r716+kjzG0EQdoPmaz4lXCEg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=lqXs4gC1V2vkGiXxFQEj58yekCs6LH/bZpdbF0IoBqlyTwI9mjTfX3Ls1UG3famc8cfm6Tw5hd1jDxXUKx+NKl+zy3QVthFUIJxJ/X9nE0EFUMIW1ivvFdZtZNmyhPguBJIIgqGpY512FFYgHJD9QM4vimKIozbXPZTv/7UPLyvxliDePcSzFH4WyN6JYr0Ed7P5+9BS78QzV+Rta47c7+IlUQLiA8gATo5q9XMkdtMwAxP7fZKkQjS3Js/opMGiyBU5DxZHz6fpYXv3e1ji9vhr9IM2+Lg8skSkT5r70x4Us/PHVEMtzX8b8Z+K6HOjRLUGue+TXZ6AZ6qf+CLWpg== X-YMail-OSG: CEZKlzcVM1kbvkePVZqUhwk82CnU9MP6ATSF9ark8wOexwJ1zqv9P.ZKW7quOqK _HJXMB.bzBgaaqNp08_.rxiszinLB.78tPHljY58vaKsDB4R3P4Pc1gTaCMCOinZ1L1vXRPPpdxj 90_K5JPr7Y0JAOIyo8i71O9_fRceqmTVqdhrEHoG1pQNmU8zP..BtxDvIOLy02pokP2uHacYUC11 HvXxoxuFdfQ31w.bv7wDzDij40wg2V_CU3Bo0N.NV7cZKoXVB61Oe.83XFLNimdxNM3zDcrPELw_ voYdBhWdIzqR.v8zgMEXmqJFm4iLmyZ8Xyi2ywqhcWylE2VzSVhWZ8__Fb6Sm2AjH4tBhbjqzT5W tq_0NJTagFh60GL2h.Nr8LCCygP7ocyiHYItBpbyjv5b5OsYZEVUJQNhME3RmF4Egxoi8vhmM.P. hLnH_B7Xo2sKEplwX40ZguCIhySuqyEpC48HktSpE54sNjVYxKNqeefrr6Upnpu195R2f6qSE93A R0vBRE1ms4Uz2wpfc0PFpSJmk4haQkWrV49NYhy_w8XPgZjN8HvlFwHbPBC5sFFwM8U_1zHTvfCa XDf_aKI.SaB_V4J.n4x7Tt3TH6U0dA9NmMzaiTtQeafOsFeAWU0egNPby_zD3xTIPdnpdSOa_53l X7iQiKx0nXUU8xiSmkGecbkc5kg9tbC6TdRkEfKc7VMAqqecyuob3QISL056q9qLxBSroeIJwei2 QH8f01h434JP768A8wc3rH3UL4RMJyoWmS.aP_E7AJe8rqoBsPJZSaAXzevfiaxffaxp9398JPnG 4N5723NEr_3L.QO_JDEfCY8hDTRegjwERRAoepip1k Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.bf2.yahoo.com with HTTP; Mon, 14 Sep 2020 16:27:22 +0000 Original-Received: by smtp423.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 5541276267aeae33353379a8ecdab120; Mon, 14 Sep 2020 16:27:15 +0000 (UTC) Content-Disposition: inline In-Reply-To: <83r1r49yc2.fsf@gnu.org> X-Mailer: WebService/1.1.16583 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Apache-HttpAsyncClient/4.1.4 (Java/11.0.7) Received-SPF: pass client-ip=74.6.130.41; envelope-from=spacibba@aol.com; helo=sonic308-2.consmr.mail.bf2.yahoo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/14 12:27:22 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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:255677 Archived-At: On Mon, Sep 14, 2020 at 06:23:25PM +0300, Eli Zaretskii wrote: >> Date: Mon, 14 Sep 2020 13:38:16 +0200 >> From: Ergus >> >> I have been playing with x-popup-menu today and I noticed that in >> terminal, when we pass t as the first parameter the popup appears in >> position (0, 0) which is wrong. >> >> I debugged the C code and it seems that this position is expected to be >> computed in x_popup_menu_1 calling: >> >> mouse_position_hook which is a pointer to term_mouse_position and the >> vales are taken there from last_mouse_x and last_mouse_y. >> >> The issue is that those values are updated only in term_mouse_movement >> which is called in handle_one_term_event but that function never >> triggers my gdb. >> >> Is this somehow intended and a limitation of the terminal interface?? > >It's hard to answer your questions, because you didn't describe what >you tried to do. For starters, did you invoke and navigate the menus >with a mouse or with a keyboard? > Hi Eli: The menu part is just how I observed the issue. The problem is somewhere else; handle_one_term_event is never called (at least for me) either when moving the cursor, or the mouse or clicking here and there. So the variables last_mouse_x and last_mouse_y are not updated. So far I observe that handle_one_term_event is called in a single place in the code, but the condition to enter the "if" around is never true at least for me. I tried to create the x-dialog from the scratch buffer. The code works as expected in gui, but in xterm I see this problem. I just tried this in xterm: (x-popup-dialog t '("Dialog" "Value1" "Value")) And the dialog appears either in (0,0) or in the center of the screen, but not related with the mouse or cursor positions. There is another function that updated last_mouse_x and last_mouse_y, but all it's code is commented. Best, Ergus