From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Evgeny Zajcev Newsgroups: gmane.emacs.devel Subject: Re: Hollow cursor under images Date: Mon, 4 Mar 2019 23:04:10 +0300 Message-ID: References: <83bm2qea01.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000002caa0005834a43bd" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="91421"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 04 21:24:51 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h0u8o-000Nga-VM for ged-emacs-devel@m.gmane.org; Mon, 04 Mar 2019 21:24:51 +0100 Original-Received: from localhost ([127.0.0.1]:60596 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0u8n-00075F-Ku for ged-emacs-devel@m.gmane.org; Mon, 04 Mar 2019 15:24:49 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0tpT-00079g-Ny for emacs-devel@gnu.org; Mon, 04 Mar 2019 15:04:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h0tpR-0001Vu-P4 for emacs-devel@gnu.org; Mon, 04 Mar 2019 15:04:51 -0500 Original-Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]:39042) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h0tpF-0000zs-SP; Mon, 04 Mar 2019 15:04:39 -0500 Original-Received: by mail-lf1-x132.google.com with SMTP id r123so4423698lff.6; Mon, 04 Mar 2019 12:04:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0zztFvjSxlDNUOa5ShTy1RPjtJVJDxUBFi9x5mzPVlU=; b=ZZQDt1szeh3gCyHVisTuUp/9OqH1WvFQSry9zNqVXA9C654i5a6H7GWk3/HaRmGJ1V 3heAqsrPy+fWF5o4l6hxCxvWP/HSS3VSjK4j3ZZmQeKJONia7sDiM79Y8XPYOpeYIl+n LXdSXWUi76/B1lzTnaZrqsqHP1ej+HP3QwimOxuFtNO6QHIzK6ACpb0m0AB9t7HVkfne oVxDWZ6jSx92NeADKOAkgvq5Sh3Rbfpm7PgZRcpfM9UK4nBbYYY4VvDN61xiXZai8e/g 9UDohDS74J6XnD1z6HT4UdM67abuSh85nO84aEIHqgeurO3Hu4jVkfMxykwe00/+HHvz zTgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0zztFvjSxlDNUOa5ShTy1RPjtJVJDxUBFi9x5mzPVlU=; b=YvIfYn0kywsl5Kwqi6catDKvAUu1bxzltQqm3UIZpqIcCKTFcg34jkhkxckYP6iTZO R1u31tXZUL0epFmJKlF4d9Gna6DdUNEyyuaBY7Ox/YlopOKKJAXyq39Konjjtfd8/ys1 nOZIqqPXU9dQMA+ppgmOymEJy3J3r/x6rERuKEKnpveyMj7KjdNusW43AIYdPbu9N+Uy Y9zQzdddBoFfxpoXngN9cuaiUH4xC+5O+DuwvP7Ii9Uimjmo9EpUqOdmMxNVbMKqB00a AdeNw9rqVQAnu/l8Bt+mzUVcWsE/hbQ8KYRV0CYM2JbKT18nXbP3HxLi/jINWefIbZVI oGWw== X-Gm-Message-State: APjAAAUj4UMh1Wswwqc1lutUF/ORGC9xg/B2EpvaxH+QBL1EcoWXQYcM l28himuOVldpSgWWXsyi0c+zu3li4gW7WoG9P1m4Xfvp X-Google-Smtp-Source: APXvYqyRASX0j+rZ+MK0exr5isKD51MmCyhDWqZAS6dLTi3h1XnXgv91Fa/qlg9nLfro4WCk2WRoFFb7pxVZgozy/sY= X-Received: by 2002:a19:ae0a:: with SMTP id f10mr10838523lfc.1.1551729861370; Mon, 04 Mar 2019 12:04:21 -0800 (PST) In-Reply-To: <83bm2qea01.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::132 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:233829 Archived-At: --0000000000002caa0005834a43bd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =D0=BF=D0=BD, 4 =D0=BC=D0=B0=D1=80. 2019 =D0=B3. =D0=B2 22:05, Eli Zaretski= i : > > From: Evgeny Zajcev > > Date: Mon, 4 Mar 2019 21:14:06 +0300 > > > > I've got `cursor-type' set to `box', however when cursor is under image > it displays as if it was `hollow', i.e. > > image margins and non-mask pixels are displayed with the background > color of face under cursor, not the > > cursor color. > > What is "face under cursor" in this context? > I have text property `face' attached to the region which image occupies, consider: (let ((svg (svg-create (frame-char-width) (* 2 (frame-char-height))))) (svg-circle svg 10 10 10 :fill-color "red") (insert (propertize "X" 'face 'region 'display (list '(slice 0.0 0.0 1.0 0.5) (svg-image svg :scale 1.0 :ascent 'center :mask 'heuristic))))) Background of the image gets color from `region' face, but when the cursor is under the image it gets hollow type and still background of `region' face is visible. I just realized, that if I create image that fits into single char, such as= : (let ((svg (svg-create (frame-char-width) (frame-char-height)))) (svg-circle svg 10 10 10 :fill-color "red") (insert (propertize "X" 'face 'region 'display (svg-image svg :scale 1.0 :ascent 'center :mask 'heuristic)))) Then cursor behaves as expected initially! It does not get hollow type and background gets cursor color. I expected the same for images that do not fit into single char > > Is this intended behaviour? > > If I understand what you described (and I'm not surer I did), then > no. You should see the cursor color. > --=20 lg --0000000000002caa0005834a43bd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
=D0=BF=D0=BD, 4 =D0=BC=D0=B0=D1=80. 2019 =D0=B3. =D0=B2 22:05, El= i Zaretskii <eliz@gnu.org>:
> From: Evgeny Zajcev <lg.zevlg@gmail.com>
> Date: Mon, 4 Mar 2019 21:14:06 +0300
>
> I've got `cursor-type' set to `box', however when cursor i= s under image it displays as if it was `hollow', i.e.
> image margins and non-mask pixels are displayed with the background co= lor of face under cursor, not the
> cursor color.

What is "face under cursor" in this context?

I have text property `face' attached to the region whic= h image occupies, consider:

(let ((svg (svg-create= (frame-char-width) (* 2 (frame-char-height)))))
=C2=A0 (svg-circle svg = 10 10 10 :fill-color "red")
=C2=A0 (insert (propertize "X= " 'face 'region
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 'display (list '(slice 0.0 0.0 1.0 0.5)
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (svg-image svg :scal= e 1.0
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 :ascent = 'center
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 :m= ask 'heuristic)))))

Background of the image gets colo= r from `region' face, but when the cursor is under the image it gets ho= llow type and still background of `region' face is visible.
<= br>
I just realized, that if I create image that fits into singl= e char, such as:

(let ((svg (svg-create (frame-cha= r-width) (frame-char-height))))
=C2=A0 (svg-circle svg 10 10 10 :fill-co= lor "red")
=C2=A0 (insert (propertize "X" 'face = 'region
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 'dis= play (svg-image svg :scale 1.0
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 :ascent 'cent= er
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 :mask 'heuristic))))

Then cursor behaves as expected initially!=C2=A0 It does not get hol= low type and background gets cursor color.=C2=A0 I expected the same for im= ages that do not fit into single char


> Is this intended behaviour?

If I understand what you described (and I'm not surer I did), then
no.=C2=A0 You should see the cursor color.


--
lg
--0000000000002caa0005834a43bd--