GNU bug report logs - #59320
29.0.50; (Windows) Cursor is invisble unless inhibit-double-buffer is t, and then it only appears as a single pixel line

Previous Next

Package: emacs;

Reported by: Casey Banner <kcbanner <at> gmail.com>

Date: Wed, 16 Nov 2022 20:57:01 UTC

Severity: normal

Found in version 29.0.50

To reply to this bug, email your comments to 59320 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#59320; Package emacs. (Wed, 16 Nov 2022 20:57:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Casey Banner <kcbanner <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 16 Nov 2022 20:57:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Casey Banner <kcbanner <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; (Windows) Cursor is invisble unless inhibit-double-buffer is
 t, and then it only appears as a single pixel line
Date: Wed, 16 Nov 2022 11:25:58 -0500
This occurs in my config as well as emacs -Q. The cursor is invisible,
unless I enable inhibit-double-buffer. Then it appears but only a
single line regardless of the cursor-type setting.

A video of the issue here: https://imgur.com/f8nepbE

Thanks!,
Casey

In GNU Emacs 29.0.50 (build 3, x86_64-w64-mingw32) of 2022-11-16 built
 on DESKTOP-EK25TL1
Repository revision: f793add1758fd01f678698a90f5847b575f63cf8
Repository branch: master
Windowing system distributor 'Microsoft Corp.', version 10.0.19044
System Description: Microsoft Windows 10 Pro (v10.0.2009.19044.2251)

Configured using:
 'configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32
 --build=x86_64-w64-mingw32 --prefix=/e/dev/emacs-src --without-dbus
 --without-pop --with-native-compilation --with-cairo --with-harfbuzz
 --with-xml2 --without-compress-install --with-json 'CFLAGS=-O2
 -mtune=native -march=native -fomit-frame-pointer -pipe
 -ftree-vectorize' --with-pgtk'

Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS WEBP XPM ZLIB

Important settings:
  value of $LANG: ENC
  locale-coding-system: cp1252

Major mode: ELisp/d

Minor modes in effect:
  shell-dirtrack-mode: t
  recentf-mode: t
  display-line-numbers-mode: t
  which-key-mode: t
  solaire-global-mode: t
  company-box-mode: t
  company-tng-mode: t
  global-company-mode: t
  company-mode: t
  global-auto-revert-mode: t
  ivy-prescient-mode: t
  ivy-posframe-mode: t
  ivy-mode: t
  delete-selection-mode: t
  minions-mode: t
  doom-modeline-mode: t
  override-global-mode: t
  global-smartscan-mode: t
  smartscan-mode: t
  global-hl-line-mode: t
  gcmh-mode: t
  straight-use-package-mode: t
  straight-package-neutering-mode: t
  straight-symlink-emulation-mode: t
  straight-live-modifications-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
c:/Users/kcbanner/.emacs.d/straight/build/ws-trim/ws-trim hides
~/.emacs.d/elisp/ws-trim
c:/Users/kcbanner/.emacs.d/straight/build/transient/transient hides
e:/dev/emacs-src/share/emacs/29.0.50/lisp/transient
c:/Users/kcbanner/.emacs.d/straight/build/let-alist/let-alist hides
e:/dev/emacs-src/share/emacs/29.0.50/lisp/emacs-lisp/let-alist

Features:
(shadow sort mail-extr emacsbug message yank-media rfc822 mml mml-sec
epa derived gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils misearch multi-isearch lsp-diagnostics
lsp-headerline lsp-icons lsp-modeline lsp-lens vc-hg vc-git diff-mode
vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs log-view pcvs-util origami
origami-parsers cl lsp-ui lsp-ui-flycheck lsp-ui-doc goto-addr
lsp-ui-imenu lsp-ui-peek lsp-ui-sideline flycheck lsp-ui-util find-func
view lsp-zig lsp-steep lsp-svelte lsp-sqls lsp-ruby-syntax-tree lsp-yaml
lsp-xml lsp-vimscript lsp-vhdl lsp-volar lsp-vetur lsp-html lsp-verilog
lsp-vala lsp-v lsp-typeprof lsp-ttcn3 lsp-toml lsp-terraform lsp-tex
lsp-sorbet lsp-solargraph lsp-rust lsp-rf lsp-remark lsp-racket lsp-r
lsp-purescript lsp-pylsp lsp-pyls lsp-pwsh lsp-php lsp-pls
lsp-perlnavigator lsp-perl lsp-openscad lsp-ocaml lsp-magik lsp-nix
lsp-nim lsp-nginx lsp-mint lsp-marksman lsp-markdown lsp-lua lsp-kotlin
lsp-json url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf mailcap lsp-javascript lsp-idris lsp-haxe
lsp-groovy lsp-hack lsp-graphql lsp-gleam lsp-go lsp-completion
lsp-gdscript lsp-fsharp lsp-fortran lsp-eslint lsp-erlang lsp-emmet
lsp-elixir lsp-elm lsp-dockerfile lsp-dhall lsp-d lsp-css lsp-csharp
gnutls lsp-crystal lsp-cmake lsp-clojure lsp-semantic-tokens lsp-clangd
dom lsp-beancount lsp-bash lsp-ansible lsp-angular lsp-ada
lsp-actionscript ffap tramp tramp-loaddefs trampver tramp-integration
cus-start tramp-compat shell pcomplete parse-time iso8601 recentf
bookmark display-line-numbers which-key solaire-mode company-box
company-box-doc frame-local company-box-icons company-tng
company-box-autoloads frame-local-autoloads company-oddmuse
company-keywords company-etags etags fileloop generator company-gtags
company-dabbrev-code company-dabbrev company-files company-clang
company-capf company-cmake company-semantic company-template
company-bbdb company company-autoloads lsp-ui-autoloads zig-mode
zig-mode-autoloads autorevert lsp-ivy lsp-mode url-util tree-widget
spinner network-stream puny nsm markdown-mode url-parse auth-source
password-cache url-vars thingatpt noutline outline lv inline imenu
filenotify ewoc epg rfc6068 epg-config lsp-protocol json ht
lsp-ivy-autoloads lsp-mode-autoloads lv-autoloads spinner-autoloads
ht-autoloads ivy-prescient prescient char-fold map
ivy-prescient-autoloads prescient-autoloads ivy-posframe posframe
ivy-posframe-autoloads posframe-autoloads flycheck-autoloads
let-alist-autoloads pkg-info-autoloads epl-autoloads counsel xdg xref
project dired dired-loaddefs swiper ivy delsel ivy-faces ivy-overlay
colir color counsel-autoloads swiper-autoloads ivy-autoloads minions
minions-autoloads doom-modeline doom-modeline-segments doom-modeline-env
doom-modeline-core shrink-path f f-shortdoc shortdoc s dash
doom-modeline-autoloads shrink-path-autoloads f-autoloads
doom-themes-ext-org doom-themes-ext-treemacs doom-themes-ext-visual-bell
face-remap doom-snazzy-theme doom-themes doom-themes-base
doom-themes-autoloads origami-autoloads use-package-bind-key bind-key
solaire-mode-autoloads all-the-icons all-the-icons-faces data-material
data-weathericons data-octicons data-fileicons data-faicons
data-alltheicons all-the-icons-autoloads which-key-autoloads align
glsl-mode glsl-mode-autoloads ws-trim ws-trim-autoloads hungry-delete
hungry-delete-autoloads smartscan smartscan-autoloads
replace-from-region-autoloads markdown-mode-autoloads
groovy-mode-autoloads dash-autoloads s-autoloads yaml-mode-autoloads
lua-mode-autoloads csv-mode-autoloads finder-inf rg files-x vc
vc-dispatcher rg-info-hack advice rg-menu transient time-date comp
comp-cstr warnings rx format-spec edmacro kmacro eieio eieio-core compat
compat-macs rg-ibuffer rg-result wgrep-rg wgrep rg-history rg-header
ibuf-ext ibuffer ibuffer-loaddefs grep compile text-property-search
comint ansi-osc ansi-color ring cus-edit pp cus-load icons wid-edit
rg-autoloads wgrep-autoloads transient-autoloads compat-autoloads
use-package-core hl-line gcmh use-package-autoloads bind-key-autoloads
straight-autoloads cl-extra help-mode straight info autoload
loaddefs-gen generate-lisp-file radix-tree lisp-mnt easy-mmode cl-seq
pcase subr-x byte-opt cl-macs gv cl-loaddefs cl-lib bytecomp
byte-compile rmc iso-transl tooltip cconv eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel dos-w32 ls-lisp
disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 833099 372824)
 (symbols 48 36148 6)
 (strings 32 210572 89136)
 (string-bytes 1 6026076)
 (vectors 16 140055)
 (vector-slots 8 2575699 981150)
 (floats 8 1844 2152)
 (intervals 56 2092 1612)
 (buffers 984 21))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59320; Package emacs. (Thu, 17 Nov 2022 02:08:02 GMT) Full text and rfc822 format available.

Message #8 received at 59320 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Casey Banner <kcbanner <at> gmail.com>
Cc: 59320 <at> debbugs.gnu.org
Subject: Re: bug#59320: 29.0.50; (Windows) Cursor is invisble unless
 inhibit-double-buffer is t, and then it only appears as a single pixel
 line
Date: Thu, 17 Nov 2022 10:07:37 +0800
Casey Banner <kcbanner <at> gmail.com> writes:

> This occurs in my config as well as emacs -Q. The cursor is invisible,
> unless I enable inhibit-double-buffer. Then it appears but only a
> single line regardless of the cursor-type setting.
>
> A video of the issue here: https://imgur.com/f8nepbE

I can't open that page.  Would you please post it as a link?

Also, at present, I don't have access to any MS Windows machine where
debugging Emacs is easy.  So if someone else could look into that I'd be
quite grateful.

>  -ftree-vectorize' --with-pgtk'

BTW, --with-pgtk is not useful on MS Windows.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59320; Package emacs. (Thu, 17 Nov 2022 02:49:02 GMT) Full text and rfc822 format available.

Message #11 received at 59320 <at> debbugs.gnu.org (full text, mbox):

From: Visuwesh <visuweshm <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Casey Banner <kcbanner <at> gmail.com>, 59320 <at> debbugs.gnu.org
Subject: Re: bug#59320: 29.0.50; (Windows) Cursor is invisble unless
 inhibit-double-buffer is t, and then it only appears as a single pixel
 line
Date: Thu, 17 Nov 2022 08:18:26 +0530
[வியாழன் நவம்பர் 17, 2022] Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> Casey Banner <kcbanner <at> gmail.com> writes:
>
>> This occurs in my config as well as emacs -Q. The cursor is invisible,
>> unless I enable inhibit-double-buffer. Then it appears but only a
>> single line regardless of the cursor-type setting.
>>
>> A video of the issue here: https://imgur.com/f8nepbE
>
> I can't open that page.  Would you please post it as a link?

How about this https://i.bcow.xyz/f8nepbE.mp4?
[ To those who are wondering, i.bcow.xyz is an instance of an alternate
  imgur frontend called rimgo.  ]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59320; Package emacs. (Thu, 17 Nov 2022 03:27:02 GMT) Full text and rfc822 format available.

Message #14 received at 59320 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Visuwesh <visuweshm <at> gmail.com>
Cc: Casey Banner <kcbanner <at> gmail.com>, 59320 <at> debbugs.gnu.org
Subject: Re: bug#59320: 29.0.50; (Windows) Cursor is invisble unless
 inhibit-double-buffer is t, and then it only appears as a single pixel
 line
Date: Thu, 17 Nov 2022 11:26:26 +0800
Visuwesh <visuweshm <at> gmail.com> writes:

> [வியாழன் நவம்பர் 17, 2022] Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:
>
>> Casey Banner <kcbanner <at> gmail.com> writes:
>>
>>> This occurs in my config as well as emacs -Q. The cursor is invisible,
>>> unless I enable inhibit-double-buffer. Then it appears but only a
>>> single line regardless of the cursor-type setting.
>>>
>>> A video of the issue here: https://imgur.com/f8nepbE
>>
>> I can't open that page.  Would you please post it as a link?
>
> How about this https://i.bcow.xyz/f8nepbE.mp4?
> [ To those who are wondering, i.bcow.xyz is an instance of an alternate
>   imgur frontend called rimgo.  ]

Casey, do you have w32_use_visible_system_caret set to t?  That's the
only possibly related thing I can see in w32term.c.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59320; Package emacs. (Tue, 22 Nov 2022 04:02:01 GMT) Full text and rfc822 format available.

Message #17 received at 59320 <at> debbugs.gnu.org (full text, mbox):

From: Casey Banner <kcbanner <at> gmail.com>
To: 59320 <at> debbugs.gnu.org
Subject: Re: bug#59320: Acknowledgement (29.0.50; (Windows) Cursor is invisble
 unless inhibit-double-buffer is t,
 and then it only appears as a single pixel line)
Date: Mon, 21 Nov 2022 23:01:27 -0500
Apologies for my slow response, I thought I was subscribed to mails
for responses here.

>>> Casey, do you have w32_use_visible_system_caret set to t?  That's the
>>> only possibly related thing I can see in w32term.c.

Aha, yes! Setting this to nil restores my cursor back to normal. I
hadn't started using a screen reader,
but it seems that enabling the "Turn on Speech Recognition" feature
triggers this to be set via the
SPI_GETSCREENREADER flag. I can verify disabling this feature then
opening emacs displays
causes w32_use_visible_system_caret to be nil, but enabling it causes
it to be t.

Thanks for looking into this for me!

Cheers,
Casey




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59320; Package emacs. (Tue, 22 Nov 2022 13:31:01 GMT) Full text and rfc822 format available.

Message #20 received at 59320 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Casey Banner <kcbanner <at> gmail.com>, Po Lu <luangruo <at> yahoo.com>
Cc: 59320 <at> debbugs.gnu.org
Subject: Re: bug#59320: Acknowledgement (29.0.50;
 (Windows) Cursor is invisble unless inhibit-double-buffer is t, and
 then it only appears as a single pixel line)
Date: Tue, 22 Nov 2022 15:19:54 +0200
> From: Casey Banner <kcbanner <at> gmail.com>
> Date: Mon, 21 Nov 2022 23:01:27 -0500
> 
> >>> Casey, do you have w32_use_visible_system_caret set to t?  That's the
> >>> only possibly related thing I can see in w32term.c.
> 
> Aha, yes! Setting this to nil restores my cursor back to normal. I
> hadn't started using a screen reader,
> but it seems that enabling the "Turn on Speech Recognition" feature
> triggers this to be set via the
> SPI_GETSCREENREADER flag. I can verify disabling this feature then
> opening emacs displays
> causes w32_use_visible_system_caret to be nil, but enabling it causes
> it to be t.

So I guess we should disable double-buffering on Windows when system caret
is in use?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59320; Package emacs. (Tue, 22 Nov 2022 16:30:02 GMT) Full text and rfc822 format available.

Message #23 received at 59320 <at> debbugs.gnu.org (full text, mbox):

From: Casey Banner <kcbanner <at> gmail.com>
To: 59320 <at> debbugs.gnu.org
Date: Tue, 22 Nov 2022 11:29:35 -0500
>>> So I guess we should disable double-buffering on Windows when system caret is in use?

That might be a good default for that case. However, I'm not sure if
this is some quirk of my windows settings, graphics driver, refresh
rate, etc. I am happy to run any tests you would need to get more
info.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59320; Package emacs. (Wed, 23 Nov 2022 00:44:01 GMT) Full text and rfc822 format available.

Message #26 received at 59320 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Casey Banner <kcbanner <at> gmail.com>, 59320 <at> debbugs.gnu.org
Subject: Re: bug#59320: Acknowledgement (29.0.50; (Windows) Cursor is
 invisble unless inhibit-double-buffer is t, and then it only appears as a
 single pixel line)
Date: Wed, 23 Nov 2022 08:42:43 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> So I guess we should disable double-buffering on Windows when system caret
> is in use?

I'd only do that if all else fails.  How does MS-Windows display the
system caret, and why can't it be made to work with double-buffering?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59320; Package emacs. (Wed, 23 Nov 2022 13:44:02 GMT) Full text and rfc822 format available.

Message #29 received at 59320 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: kcbanner <at> gmail.com, 59320 <at> debbugs.gnu.org
Subject: Re: bug#59320: Acknowledgement (29.0.50; (Windows) Cursor is
 invisble unless inhibit-double-buffer is t, and then it only appears as a
 single pixel line)
Date: Wed, 23 Nov 2022 15:44:02 +0200
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: Casey Banner <kcbanner <at> gmail.com>,  59320 <at> debbugs.gnu.org
> Date: Wed, 23 Nov 2022 08:42:43 +0800
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > So I guess we should disable double-buffering on Windows when system caret
> > is in use?
> 
> I'd only do that if all else fails.  How does MS-Windows display the
> system caret, and why can't it be made to work with double-buffering?

I don't know the answer to the second part, but if you search the C sources
for w32_use_visible_system_caret, you will probably see the answer right
away (there aren't many hits).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59320; Package emacs. (Wed, 23 Nov 2022 13:55:02 GMT) Full text and rfc822 format available.

Message #32 received at 59320 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: kcbanner <at> gmail.com, 59320 <at> debbugs.gnu.org
Subject: Re: bug#59320: Acknowledgement (29.0.50; (Windows) Cursor is
 invisble unless inhibit-double-buffer is t, and then it only appears as a
 single pixel line)
Date: Wed, 23 Nov 2022 21:54:32 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Po Lu <luangruo <at> yahoo.com>
>> Cc: Casey Banner <kcbanner <at> gmail.com>,  59320 <at> debbugs.gnu.org
>> Date: Wed, 23 Nov 2022 08:42:43 +0800
>> 
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>> 
>> > So I guess we should disable double-buffering on Windows when system caret
>> > is in use?
>> 
>> I'd only do that if all else fails.  How does MS-Windows display the
>> system caret, and why can't it be made to work with double-buffering?
>
> I don't know the answer to the second part, but if you search the C sources
> for w32_use_visible_system_caret, you will probably see the answer right
> away (there aren't many hits).

Sure, I will give this a look in a bit (I don't have easy access to
Windows right now.)




This bug report was last modified 2 years and 209 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.