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: Sat, 14 Sep 2019 14:48:26 +0300 Message-ID: References: <83bm2qea01.fsf@gnu.org> <20190304223605.GA22198@breton.holly.idiocy.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000086ea8a059281f3e6" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="244931"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Eli Zaretskii , emacs-devel To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 14 13:48:58 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.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i96Xt-0011UK-LK for ged-emacs-devel@m.gmane.org; Sat, 14 Sep 2019 13:48:53 +0200 Original-Received: from localhost ([::1]:49374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i96Xr-00022q-OQ for ged-emacs-devel@m.gmane.org; Sat, 14 Sep 2019 07:48:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55312) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i96Xi-00022f-Kq for emacs-devel@gnu.org; Sat, 14 Sep 2019 07:48:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i96Xh-0005bf-Ho for emacs-devel@gnu.org; Sat, 14 Sep 2019 07:48:42 -0400 Original-Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:32953) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i96Xf-0005ak-Te; Sat, 14 Sep 2019 07:48:40 -0400 Original-Received: by mail-lf1-x12f.google.com with SMTP id y127so808268lfc.0; Sat, 14 Sep 2019 04:48:39 -0700 (PDT) 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=q9GuLhlVQcfdI48EPvZrCevWiyyeyvna5U2NYeMFcu8=; b=fhufjby9nnEav5qs9S/9BAuzb4KBjzFZCxEiMtJkU168EfxwULcwuCBJlHupksqrsl eQS8D6kFsMNLiSRZUs3fNWyDmyxWpS83AWIaMUsoRyVN2Rt2x6N33Fu/gZxfR3KzQoyQ gTucdVLBTjpJRbRlHo3DLKBxoD9BXS5vu0b0H6NajZ4x0+bL8Ghc1r9uMpT5SS0OL4nr 0w+AhuwPI6oPbKzKT8RxIjhinC5TfADZhEgMEGfgH2+BZ0PbmrlN87PlHDlY2scLIx2q PRDeB3vJ0N6b/kLTp0cytRCV4VTcMbiuxJ6IOBpno7EkX/AKoBz7uEdXvovXuM4b1sWC volA== 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=q9GuLhlVQcfdI48EPvZrCevWiyyeyvna5U2NYeMFcu8=; b=P2oaLtleBSkEXUWtX5a/gFykqwqZ3yp8y5qG360P2MCNYVaJdLg2T4bgjFcla0jR63 prQ9IXbkTgRCVJhYa7LmQYdxT0kzjovJOFgub4MRxkWvVDQa8a9+JGdcyeeKWQSw3B4K 9kg1jEe4eC3hGj8mTinoTVp+nVb4vJcunvCpXLKCeN7No8pqPbf5V9komXa0hMTeyWBU ZovcXJ+zZHNDyqL7bqUtVQk+5hs5I+yokMFU9zJZl/I7UCyjly5WbdzLe+1KnG3514LH kuaoC31c3f2bN40j6AxhyrNPbeioBi7jxWgkooG/S5tPz4pCpgs9e1vLqbkhqBqBXc0n jUqw== X-Gm-Message-State: APjAAAXgJ9LVGEkMHVttHg7Zcs3HTGMVaDQeuBEnKaOJTv0m+vduDBEb DSe2PrJhHnOXNhTnXNAbx83dOBqKULbf4vvCh4o= X-Google-Smtp-Source: APXvYqybtWr4oqwv8IjSOWlLqtB3h24ERdt3J07DNjA6XEGOM1lazo0kl05+0dA8lR9koJxyAqOlAVkEJ2u0tFvIRII= X-Received: by 2002:a19:644c:: with SMTP id b12mr32767702lfj.104.1568461717693; Sat, 14 Sep 2019 04:48:37 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::12f 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240030 Archived-At: --00000000000086ea8a059281f3e6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =D0=B2=D1=82, 5 =D0=BC=D0=B0=D1=80. 2019 =D0=B3. =D0=B2 13:19, Evgeny Zajce= v : > [...] > In my case 32 for width is the trigger and `(frame-char-height) =3D=3D 53' = for > height triggers the hollow cursor behaviour. > > Looks like a bug > I've found this in xdisp.c: .... if (cursor_type =3D=3D FILLED_BOX_CURSOR) { /* Using a block cursor on large images can be very annoying. So use a hollow cursor for "large" images. If image is not transparent (no mask), also use hollow cursor. */ struct image *img =3D IMAGE_OPT_FROM_ID (f, glyph->u.img_id); if (img !=3D NULL && IMAGEP (img->spec)) { /* Arbitrarily, interpret "Large" as >32x32 and >NxN where N =3D size of default frame font size. This should cover most of the "tiny" icons people may use. */ if (!img->mask || img->width > max (32, WINDOW_FRAME_COLUMN_WIDTH (w)) || img->height > max (32, WINDOW_FRAME_LINE_HEIGHT (w))) cursor_type =3D HOLLOW_BOX_CURSOR; } .... Maybe introduce some property in image spec to control cursor behaviour? Or make customizable definition for "tiny" icons? Thanks --=20 lg --00000000000086ea8a059281f3e6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=D0=B2=D1=82, 5 =D0=BC=D0=B0=D1= =80. 2019 =D0=B3. =D0=B2 13:19, Evgeny Zajcev <lg.zevlg@gmail.com>:
[...]
<= div dir=3D"ltr">
In my case 32 for width is = the trigger and `(frame-char-height) =3D=3D 53' for height triggers=C2= =A0the hollow cursor behaviour.

Looks like a bug

I've found this in xdis= p.c:

....
=C2=A0 if (cursor_type = =3D=3D FILLED_BOX_CURSOR)
=C2=A0 =C2=A0{
=C2=A0 =C2=A0 =C2=A0/* U= sing a block cursor on large images can be very annoying.
So use a ho= llow cursor for "large" images.
If image is not transparent= (no mask), also use hollow cursor. =C2=A0*/
=C2=A0 =C2=A0 =C2=A0struc= t image *img =3D IMAGE_OPT_FROM_ID (f, glyph->u.img_id);
=C2=A0 =C2= =A0 =C2=A0if (img !=3D NULL && IMAGEP (img->spec))
{
= =C2=A0/* Arbitrarily, interpret "Large" as >32x32 and >NxN<= br> =C2=A0 =C2=A0 where N =3D size of default frame font size.
=C2= =A0 =C2=A0 This should cover most of the "tiny" icons people may = use. =C2=A0*/
=C2=A0if (!img->mask
=C2=A0 =C2=A0 =C2=A0|| im= g->width > max (32, WINDOW_FRAME_COLUMN_WIDTH (w))
=C2=A0 =C2= =A0 =C2=A0|| img->height > max (32, WINDOW_FRAME_LINE_HEIGHT (w))) =C2=A0 =C2=A0cursor_type =3D HOLLOW_BOX_CURSOR;
}
....

Maybe introduce some property in image spec to cont= rol cursor behaviour?=C2=A0 Or make customizable definition for "tiny&= quot; icons?

Thanks

-= -
lg
--00000000000086ea8a059281f3e6--