From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jared Finder Newsgroups: gmane.emacs.devel Subject: Re: "Final" version of tty child frames Date: Sat, 04 Jan 2025 14:12:00 -0800 Message-ID: <23dfc3fde8677a984b4c37a40d09d83b@finder.org> References: <86wmi0g0x6.fsf@gnu.org> <11a86987cce9fe0a257c3fa58703dc33@finder.org> <86wmgl6jzv.fsf@gnu.org> <092cb755eee3a9b5e06d15c0b07e90b1@finder.org> <276414b03c24964aaeb9e43e8dba5e77@finder.org> <5fedec86bce470555814acbdf999f99d@finder.org> <86h6791khk.fsf@gnu.org> <09b0904da92efad899865b2ece5f3116@finder.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=_54686c23ffa9750101bc2f49ed8eb241" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36830"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org, rudalics@gmx.at To: =?UTF-8?Q?Gerd_M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 04 23:12:31 2025 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 1tUCNi-0009Qf-8a for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Jan 2025 23:12:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUCNK-0003jA-HA; Sat, 04 Jan 2025 17:12:06 -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 1tUCNH-0003iz-Ic for emacs-devel@gnu.org; Sat, 04 Jan 2025 17:12:04 -0500 Original-Received: from greenhill.hpalace.com ([192.155.80.58]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUCNF-0004XN-Mn; Sat, 04 Jan 2025 17:12:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=finder.org; s=2018; t=1736028720; bh=tdjOyXpPrUdie8AhBEgISsA/LFSIyyxN2COAjMWKpQo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=hCqKTY1xVF4kkqDR+kR2DKvTfcOBZU2y79rTbkeJyXQAkNskxjd1a0MIhHO8uANfN 21KPRuqU8f9xq8kJVtIP83YmrBAfZ4vpFxCMcTAjnZW2T0z1t6HCmnrFWUCbkPg9uE tP22Hz7QihblhA/7s9KBWHR8wvyzKToQHa754EKQjB06L0nJDqXuhX0YB9VSAUv/b3 vhKSDzKSYpJS31H2X16gE+sp50hi0fYAetuWZzRbknJELuSNn2t4/OF7j5oGBmfGB2 +W1EF15b+bI3ZF1Hg7SuK6Byf7kIpnK0L86slUIb5W8oyYxZhqmw3Qml98AXjossuE GHuLs+VHSDVCQ== Original-Received: from mail.finder.org (unknown [192.155.80.58]) by greenhill.hpalace.com (Postfix) with ESMTPSA id 585FC2F31; Sat, 4 Jan 2025 22:12:00 +0000 (UTC) In-Reply-To: X-Sender: jared@finder.org Received-SPF: pass client-ip=192.155.80.58; envelope-from=jared@finder.org; helo=greenhill.hpalace.com 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, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:327691 Archived-At: --=_54686c23ffa9750101bc2f49ed8eb241 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8; format=flowed On 2024-12-17 22:25, Gerd Möllmann wrote: > WRT GPM: Sounds to me like this is because GPM hasn't been changes to > act analogous to xt-mouse. I think there only two commits to > xt-mouse.el > in the branch. It's not much, if you look at the diffs, basically only > > - determine the frame F under (x, y) as reported by the terminal > > - Give Emacs (F, x', y'), where x' and y' are the coordinates > relative to F > > That was all I needed, in principle, at least for xterm-mouse, to make > things work. Don't know if that also fits for GPm. It was that easy to do. Attached is a patch that adds support for TTY child frames to a GPM mouse. -- MJF --=_54686c23ffa9750101bc2f49ed8eb241 Content-Transfer-Encoding: base64 Content-Type: text/x-diff; name=0001-Support-TTY-child-frames-with-GPM-mouse.patch Content-Disposition: attachment; filename=0001-Support-TTY-child-frames-with-GPM-mouse.patch; size=4948 RnJvbSA0ZDE3YzVhYjI3YmU2YWRiODQzN2Q3YTY4NWIxYTlmOGZlZTBhZGU1IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBKYXJlZCBGaW5kZXIgPGphcmVkQGZpbmRlci5vcmc+CkRhdGU6 IFNhdCwgNCBKYW4gMjAyNSAxMzo1NTowNSAtMDgwMApTdWJqZWN0OiBbUEFUQ0hdIFN1cHBvcnQg VFRZIGNoaWxkIGZyYW1lcyB3aXRoIEdQTSBtb3VzZQoKKiBzcmMvdGVybS5jIChmcmFtZV9hdCk6 IE5ldyBDIGZ1bmN0aW9uLCB3cmFwcyBMaXNwIGBmcm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