From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: master 5743b74d4b 1/2: Improve mouse dragging Date: Thu, 12 May 2022 21:23:19 +0800 Message-ID: <87bkw2yjeg.fsf@yahoo.com> References: <83sfpfp5p1.fsf@gnu.org> <87sfpfx8j8.fsf@yahoo.com> <83ilqaq5o9.fsf@gnu.org> <87fsleykdp.fsf@yahoo.com> <83h75uq4id.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35572"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 12 15:25:13 2022 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 1np8oa-00093B-Vw for ged-emacs-devel@m.gmane-mx.org; Thu, 12 May 2022 15:25:13 +0200 Original-Received: from localhost ([::1]:34220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1np8oY-0006S4-Tx for ged-emacs-devel@m.gmane-mx.org; Thu, 12 May 2022 09:25:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1np8mz-0004xP-Bv for emacs-devel@gnu.org; Thu, 12 May 2022 09:23:34 -0400 Original-Received: from sonic303-21.consmr.mail.ne1.yahoo.com ([66.163.188.147]:32846) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1np8mw-0006pS-UX for emacs-devel@gnu.org; Thu, 12 May 2022 09:23:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1652361808; bh=qSF75uAcKAv5VVSiC8Mx8AzbAKcb2x6aUFFA/gi1cMw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=DEIeEvOiIWlZWnGea/ahV1/4Zw2vH4gZViomCKJua2p/iIHmAIha749XdFWuOuBmaO5g1PB93vSnL1MHNtkXoxBlHuGkAkcFF4oB/rdSTJY+vdsZssqL79o4j/Iy0r+M5t2kl1q6OLGZZHrd0bom/Hso+3ttg2/gDO+cb3t+xzjidRwO1jfXJYZ91SHMBNiU/MkWn3t4yOaftGrQQW3FmS9xJKndDLPr9WSbP2RPR7qM8emfUcM5VQ7oIW+sss/9Xa5DlCFm/nTp2MkrCg7gD9WyLoDulkqgOHom+r0dsUNhsi+AtRAUmqXlj1qmXxdtesYmbAe5JL08R/gSf1MAcg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1652361808; bh=WntBy6gNXCsPbZI9bA3MKyQJN3wPx19qli4pp7ptFF0=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=SLP/ee933/292yhQTtvjsSEjgcn/jWHcbjlhfuGew7G9emZ3TMyfUj1X//xKiLU4/tn7oQLJcOY5WNyz8DUmUj+6bvcCAw2bnThoTbD/pxerPKUEgi4rlzgi87w6hmS84UiAiqkAgyLXVmVozMRoavpb/P60PwiYaY6UV6yUztDCNcVPqSGrCrhXHz+BXwmnxOd892+iFW18rk2o4bLuJSFak28ukVkFbFYG4kLG7Ly+8jUlWEAxg3ggB8wqIcXrFUlKaCabW9fy/hcFDJEzy8mvLU9NY38oC6qlol7h0eQORstwGjEYL3AkxVwRAtQC3ByRI6gSK17+erttkLSrKw== X-YMail-OSG: YuVGhH4VM1n7AFB4UKBGQdkogQNzyJCGjvUTSeJLicb7P7PzEuiQWrEzjUpKDhp dVCwyeSiZ4b.Eh5ScB4yRNwXJUBu2r6C_IeuAtCZjvvFTxJQcXGt1nfFPup71.46MXflo1s2onXE vCKft0DTyc3Y4yX_rakNRm31Tl25zycVyCzWNG5Cv04ojMNc_kIKLnL2mYFz8q9M2p7FR6_24Dwr tLI74DzWAK.xpAywM1APF6S8otAAadgA9l9GuHonGutTsayLhK5x6o9ikJ06j2WQIqO6lYRUgFVq oAMZlQEqDLwIM8kx8KdIcQLzEXOYJN70P1XrN7geMZBA8PkmqPIZZJJ2tUjGkTkIcIc3R6021ptO iRBCopJRwiz7g5X3fyHCEp82p4SCaXdEQEDpajuFuVezejJKmkdiQIC8BtaVERjibwIPUVHhA.sP KqHmUWxMp87A_X3KlW74sunjrhD.6fSqD1nfT0Ssp0X0tKkmmWAHbFcaopMwN5K8aqsNEuMdqvra 5qEjUZHkfVhQ7B5QhxoLmgkuLkerFX5LqiCY79jd.PqN_QvgYffE33KIAWhGvyTSJolejP8T3ttY Y8FzDfjxUBBEG7K6pD5Om2oHo4N0vJWVEmLEkm02Og4gvB6m3BV043swjEgbRfQVDrdlSpczYslS sK6fgFCyzPeO6btQdRCRrMFBr2rVzN0SdmC5hCvYjmQ23e2kCugZ7pZmPGif4MvbTLCZKGWcv2jw LTUgJdhdlp3dOIRDjjBytkgmfTHhWgt3pkl9rwvoRXokNfyP3AZ2Zg8Hq.jS96jSNxS64ZbJqQvQ FUpcmm4GNUn8wgQHefCVlVoSdHIOHxym0sCSH2MNv5 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Thu, 12 May 2022 13:23:28 +0000 Original-Received: by hermes--canary-production-sg3-856bf69955-cgwnw (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 5fa4f61b683c80aba0976dd61b854735; Thu, 12 May 2022 13:23:25 +0000 (UTC) In-Reply-To: <83h75uq4id.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 12 May 2022 16:12:10 +0300") X-Mailer: WebService/1.1.20188 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.188.147; envelope-from=luangruo@yahoo.com; helo=sonic303-21.consmr.mail.ne1.yahoo.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" Xref: news.gmane.io gmane.emacs.devel:289686 Archived-At: Eli Zaretskii writes: > "Used to use"? And now we don't? But your changes are in > tooltip-show, so if we don't use it anymore, why the changes? My changes are in `mouse-drag-and-drop-region-display-tooltip', which is used by the `mouse-drag-and-drop-region' feature to display a tooltip that follows the mouse. I didn't touch `tooltip-show' at all. > Could you possibly post a more detailed response, one which would > explain that change starting from how this stuff behaves in Emacs 28 > and why we needed to change it in Emacs 29, without omitting any > crucial details? The behavior in Emacs 28 is a serious bug (and a regression from Emacs 27) caused by the code that lets Emacs 28 display variable-width fonts in tooltips, but apparently nobody was using that particular feature during the entire development process of Emacs 28, so it wasn't found in time for the release. That code would add text properties to the `text' argument to `x-show-tip', which is bad, because `mouse-drag-and-drop-region' reinserts the string passed as `text' into the buffer the mouse was dropped on top of afterwards, which causes the inserted text to be propertized with the wrong face. I fixed that bug in `mouse-drag-and-drop-region' this March by making it use `x-show-tip' directly instead of `tooltip-show' (it is safe because we don't do anything `tooltip-show' would not.) But it turns out that `tooltip-show' does some processing on the frame parameters to make them reflect the background and foreground colors of the tooltip face before passing them to `x-show-tip', the absence of which caused tooltip colors set by some themes to not take effect in tooltips shown while dragging text, which is what this change fixes. That was fixed by this change. Thanks.