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.bugs Subject: bug#67794: 30.0.50; mouse-face is not respected on SVG images Date: Wed, 13 Dec 2023 18:23:27 +0200 Message-ID: <83a5qers00.fsf@gnu.org> References: <87plzb7eek.fsf@ledu-giraud.fr> <83sf47tumh.fsf@gnu.org> <87jzpjo6pa.fsf@ledu-giraud.fr> <877cljnzuh.fsf@ledu-giraud.fr> <83cyvbtjnk.fsf@gnu.org> <87r0jqms5r.fsf@ledu-giraud.fr> <83o7eus3a4.fsf@gnu.org> <87bkauyyvf.fsf@ledu-giraud.fr> <83cyvarvgl.fsf@gnu.org> <87sf46ccmg.fsf@ledu-giraud.fr> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2399"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67794@debbugs.gnu.org, alan@idiocy.org To: Manuel Giraud Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 13 17:24:06 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1rDS1l-0000Pf-TL for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Dec 2023 17:24:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rDS1U-0003Gk-0d; Wed, 13 Dec 2023 11:23:48 -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 1rDS1S-0003FL-UK for bug-gnu-emacs@gnu.org; Wed, 13 Dec 2023 11:23:46 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rDS1S-00031m-Ly for bug-gnu-emacs@gnu.org; Wed, 13 Dec 2023 11:23:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rDS1h-00032P-Vh for bug-gnu-emacs@gnu.org; Wed, 13 Dec 2023 11:24:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Dec 2023 16:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67794 X-GNU-PR-Package: emacs Original-Received: via spool by 67794-submit@debbugs.gnu.org id=B67794.170248463911667 (code B ref 67794); Wed, 13 Dec 2023 16:24:01 +0000 Original-Received: (at 67794) by debbugs.gnu.org; 13 Dec 2023 16:23:59 +0000 Original-Received: from localhost ([127.0.0.1]:59584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDS1f-000327-9l for submit@debbugs.gnu.org; Wed, 13 Dec 2023 11:23:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDS1c-00031o-T6 for 67794@debbugs.gnu.org; Wed, 13 Dec 2023 11:23:58 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rDS1F-0002Ql-1u; Wed, 13 Dec 2023 11:23:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=KK6JIl+AaSQyeOQDgthwTXh/hUo6sWqyiK82s4ZqyFE=; b=kMr434ZQRYNq kd3i3HfRXTiw2ow6kf8Gi0grEdcDenjMQYI0VSUae89JzuUkIoK7Qj4VhqM1LdLGGB24oRNW8IZZf UthS7fiidOtNa00wKXbz1bwpi4HoW03unx72E6ZqNbnLfTaKQDgXdTyHELbvTMrnOzzuUxK4CZuLb yrlzmBPRRZYtBAR+shhbSrM9gfn2D0UNMDrSdSnUOhF4euV3WJ2txn8SqetTLpn6C5a9Qe+IvZFgy NoLQke6ePdsdhfEZ0MutxHStfChFfABVWisez+zD+rfKSVvjsnbsrMHCwb7gIfkuQJ96VnvDjJ+zf cB6nJFbH4BWg1ed3rGC54A==; In-Reply-To: <87sf46ccmg.fsf@ledu-giraud.fr> (message from Manuel Giraud on Wed, 13 Dec 2023 17:04:39 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:276145 Archived-At: > From: Manuel Giraud > Cc: alan@idiocy.org, 67794@debbugs.gnu.org > Date: Wed, 13 Dec 2023 17:04:39 +0100 > > Eli Zaretskii writes: > > [...] > > > By contrast, lookup_image is called when a 'display' property is found > > during _generation_ of those glyphs, before showing them for the first > > time. > > Yes but the glyph generation is not done for every face under the sun, > right? So this could be done "dynamically"? Glyph generation uses the single face that's applicable to the buffer or string whose glyphs are being generated. That face is obtained by merging all the faces in effect there (see "Displaying Faces" in the ELisp manual for the details), but eventually this merging produces a single face that is used for the glyph(s). > If so, what would be a right place to have a call to lookup_image into > mouse-highlight? Is it "too late" for glyphs generation? It's too late, yes. mouse-highlight, as it currently works, doesn't regenerate glyphs, it uses glyphs already present in the glyph matrices. Which is not to say we couldn't add calls to lookup_image there, but that would need rather serious changes in show_mouse_face: it currently just identifies the glyphs that need to be redrawn, but will instead need to replace the image glyphs it finds with new ones (and then maybe replace them back in clear_mouse_face?).