From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jared Finder via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: mouse-face and help echo support for xterm mouse Date: Thu, 05 Nov 2020 00:15:10 -0800 Message-ID: References: Reply-To: Jared Finder Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=_dd62f6dd8855647597b38716b65f2c23" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34161"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Roundcube Webmail/1.3.15 Cc: "Jared Finder via \"Emacs development discussions.\"" To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 05 09:16:05 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 1kaaRA-0008lE-UL for ged-emacs-devel@m.gmane-mx.org; Thu, 05 Nov 2020 09:16:05 +0100 Original-Received: from localhost ([::1]:36438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaaRA-0000Aa-0e for ged-emacs-devel@m.gmane-mx.org; Thu, 05 Nov 2020 03:16:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54818) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaaQQ-000885-Uv for emacs-devel@gnu.org; Thu, 05 Nov 2020 03:15:19 -0500 Original-Received: from greenhill.hpalace.com ([192.155.80.58]:41712) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaaQO-00062l-DE for emacs-devel@gnu.org; Thu, 05 Nov 2020 03:15:18 -0500 Original-Received: from mail.finder.org (greenhill.hpalace.com [IPv6:2600:3c01::f03c:91ff:fe73:2daa]) by greenhill.hpalace.com (Postfix) with ESMTPSA id 0A28989C; Thu, 5 Nov 2020 08:15:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=finder.org; s=2018; t=1604564111; bh=M4O9dxuNgXT2hJjGhOCWwX0VnO+g+ksFcbXwt7VqaLk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=olcS1hpe2FTPYOpHosKaLuFNGjelAQEfia5JNBKGU3SjR991qrZepxExRC8oqc7Sv MVT7+PKfgOD3U4OMq56sH/IdNzU1dSmjTgRWRwOV1u5j3g2GE1uvuKCLL44AUh7Dny ygeZiAorzxwQwr4rSPO6QWoc4lbk6OqH7b6/rrOg9x+Qe2Z5nTxea9iJ3AkRnEoZL1 1oEylKJjttU9EFUctP+4ZDQXvfdzyBq4urq5QRBjFXbr3pkYpfHACTpXRhNA5bIJSK b7IhMJli551w+ZI+hADOpFZyg99YV0wbHLqfL8E4gMfroBw6VKyFKvQP71aC3QubQU claqL3DYy+bIQ== 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-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/05 03:15:11 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:258710 Archived-At: --=_dd62f6dd8855647597b38716b65f2c23 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On 2020-11-01 5:39 am, Stefan Monnier wrote: > Hi Jared, > > I really like this new feature but have just one comment/question? > >> + previous_help_echo_string = help_echo_string; >> + help_echo_string = Qnil; >> + >> + note_mouse_highlight(XFRAME(frame), XFIXNUM (mouse_x), XFIXNUM >> (mouse_y)); >> + >> + if (!NILP (help_echo_string) >> + || !NILP (previous_help_echo_string)) >> + { >> + gen_help_event (help_echo_string, frame, help_echo_window, >> + help_echo_object, help_echo_pos); >> + } > > I see this exact same code in other C files. > Could we move it to a file where we can share it instead of having > N copies? With the code simplification in, this logic is now sharable between xterm-mouse and GPM. Attached is an updated patch. This patch does have one actual logic change: Previously handle_one_term_event might call gen_help_event if a GPM_MOVE_EVENT or GPM_DRAG_EVENT happened but the mouse position did not change. With this patch, this is no longer the case. From testing locally with running GPM mouse, this seems to not cause any user-visible change. -- MJF --=_dd62f6dd8855647597b38716b65f2c23 Content-Transfer-Encoding: base64 Content-Type: text/x-diff; name=0001-Face-changing-text-properties-and-help-echo-now-work.patch Content-Disposition: attachment; filename=0001-Face-changing-text-properties-and-help-echo-now-work.patch; size=6680 RnJvbSA5OGUxODIwNzcyNmRkZWIxZjkyMmU5Yjk1ZjFmZDQ4MjI1MDJhNjZhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBKYXJlZCBGaW5kZXIgPGphcmVkQGZpbmRlci5vcmc+CkRhdGU6 IFNhdCwgMzEgT2N0IDIwMjAgMjE6MjU6NDcgLTA4MDAKU3ViamVjdDogW1BBVENIXSBGYWNlLWNo YW5naW5nIHRleHQgcHJvcGVydGllcyBhbmQgaGVscC1lY2hvIG5vdyB3b3JrIHdpdGgKIHh0ZXJ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BvZiB0aGUgZ2xvYmFs IHZhcmlhYmxlIGhlbHBfZWNob19zdHJpbmcKLSAgICAgICAgIGhhcyBjaGFuZ2VkLCBnZW5lcmF0 ZSBhIEhFTFBfRVZFTlQuICAqLwotICAgICAgaWYgKCFOSUxQIChoZWxwX2VjaG9fc3RyaW5nKQot CSAgfHwgIU5JTFAgKHByZXZpb3VzX2hlbHBfZWNob19zdHJpbmcpKQotCXsKLQkgIExpc3BfT2Jq ZWN0IGZyYW1lOwotCi0JICBpZiAoZikKLQkgICAgWFNFVEZSQU1FIChmcmFtZSwgZik7Ci0JICBl bHNlCi0JICAgIGZyYW1lID0gUW5pbDsKLQotCSAgZ2VuX2hlbHBfZXZlbnQgKGhlbHBfZWNob19z dHJpbmcsIGZyYW1lLCBoZWxwX2VjaG9fd2luZG93LAotCQkgICAgICAgICAgaGVscF9lY2hvX29i amVjdCwgaGVscF9lY2hvX3Bvcyk7Ci0JICBjb3VudCsrOwotCX0KKyAgICAgIC8qIEhhcyB0aGUg bW91c2UgbW92ZWQgb2ZmIHRoZSBnbHlwaCBpdCB3YXMgb24gYXQgdGhlIGxhc3Qgc2lnaHRpbmc/ ICAqLworICAgICAgaWYgKGV2ZW50LT54ICE9IGxhc3RfbW91c2VfeCB8fCBldmVudC0+eSAhPSBs YXN0X21vdXNlX3kpCisgICAgICAgIHsKKyAgICAgICAgICBsYXN0X21vdXNlX3ggPSBldmVudC0+ eDsKKyAgICAgICAgICBsYXN0X21vdXNlX3kgPSBldmVudC0+eTsKKyAgICAgICAgICBmLT5tb3Vz ZV9tb3ZlZCA9IDE7CisgICAgICAgICAgY291bnQgKz0gdXBkYXRlX21vdXNlX3Bvc2l0aW9uIChm LCBldmVudC0+eCwgZXZlbnQtPnkpOworICAgICAgICB9CiAgICAgfQogICBlbHNlCiAgICAgewot LSAKMi4yMC4xCgo= --=_dd62f6dd8855647597b38716b65f2c23--