* bug#57264: 29.0.50; Wrong xcursor colour when over an Emacs frame
@ 2022-08-17 18:38 Visuwesh
2022-08-18 2:44 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 9+ messages in thread
From: Visuwesh @ 2022-08-17 18:38 UTC (permalink / raw)
To: 57264
When the mouse pointer is over an Emacs frame, the xcursor has the wrong
colour; this is not observed with other Xorg apps like okular,
libreoffice, ungoogled-chromium.
Emacs has no problem with the default Xorg cursor theme---it is black as
expected---but this happens when I use the xcursor theme from below.
To reproduce,
1. Download and install the cursor theme from
https://π.duncano.de/files/xcursor-plan9-0.2.tar.xz
2. Launch emacs -Q as `XCURSOR_THEME=plan9 emacs -Q'.
3. Move the cursor over the Emacs frame into a void area and observe
the left pointer colour. It is white here.
4. Now repeat the same but for another application, the left pointer
colour is black as expected.
Changing the mouse face's :background does not help. It changes the
border colour. If it gives any clue, I also see this problem with st.
Thanks.
In GNU Emacs 29.0.50 (build 2, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars)
of 2022-08-15 built on astatine
Repository revision: d5ee49c25c8f59ab17c40eebdf38a769c2f5588b
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101003
System Description: Debian GNU/Linux bookworm/sid
Configured using:
'configure --with-sound=alsa --with-x-toolkit=lucid --with-json
--without-xaw3d --without-gconf --without-libsystemd --without-cairo'
Configured features:
ACL DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XFT
XIM XINPUT2 XPM LUCID ZLIB
Important settings:
value of $LC_MONETARY: ta_IN.UTF-8
value of $LC_NUMERIC: ta_IN.UTF-8
value of $LANG: en_GB.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
shell-dirtrack-mode: t
paredit-mode: t
eros-mode: t
flymake-mode: t
pdf-occur-global-minor-mode: t
minibuffer-depth-indicate-mode: t
repeat-mode: t
display-time-mode: t
display-battery-mode: t
winner-mode: t
acme-tag-minor-mode: t
delete-selection-mode: t
straight-use-package-mode: t
straight-package-neutering-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
use-hard-newlines: t
tab-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
undelete-frame-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
abbrev-mode: t
Load-path shadows:
/home/viz/lib/emacs/straight/build/faceup/faceup hides /home/viz/lib/ports/emacs/lisp/emacs-lisp/faceup
Features:
(shadow sort flyspell ispell ecomplete mail-extr emacsbug message
yank-media puny rfc822 mml mml-sec epa epg rfc6068 epg-config 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 sh-script smie executable rfc2104 cursor-sensor tramp-cache
time-stamp tramp-sh tramp tramp-loaddefs trampver tramp-integration
cus-start files-x tramp-compat shell pcomplete parse-time iso8601
ls-lisp face-remap server paredit edmacro kmacro eros time-date checkdoc
lisp-mnt flymake-proc flymake project warnings wordel-autoloads
sokoban-autoloads ement-autoloads svg-lib-autoloads
taxy-magit-section-autoloads magit-section-autoloads dash-autoloads
taxy-autoloads plz-autoloads nov-autoloads esxml-autoloads kv-autoloads
transmission-autoloads lua-mode-autoloads nix-mode-autoloads
racket-mode-autoloads pos-tip-autoloads faceup-autoloads eros-autoloads
flymake-shellcheck-autoloads writegood-mode-autoloads
siege-mode-autoloads paredit-autoloads puni-autoloads
expand-region-autoloads filladapt-autoloads compose quail
scroll-other-window org-pdftools-autoloads org-noter-autoloads
change-env-autoloads math-delimiters-autoloads doct-autoloads
ob-async-autoloads async-autoloads emacs-ob-racket-autoloads
valign-autoloads cdlatex-autoloads auctex-autoloads tex-site pdf-occur
ibuf-ext ibuffer ibuffer-loaddefs tablist advice tablist-filter
semantic/wisent/comp semantic/wisent semantic/wisent/wisent
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw mode-local cedet pdf-isearch let-alist pdf-misc imenu
pdf-tools package browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie generate-lisp-file url-domsuf
url-util mailcap url-handlers url-parse auth-source eieio eieio-core
json map byte-opt url-vars compile comint ansi-color cus-edit edebug
debug backtrace find-func icons wid-edit pdf-view password-cache
jka-compr pdf-cache pdf-info tq pdf-util pdf-macs image-mode dired-x
dired dired-loaddefs exif pdf-tools-autoloads tablist-autoloads mb-depth
repeat visual-fill-autoloads olivetti-autoloads time format-spec battery
dbus filenotify xml dom disp-table lacarte-autoloads winner ring
acme-tag shell-command+ thingatpt diff acme-tag-autoloads
shell-command-plus-autoloads delsel cus-load easy-mmode avy-autoloads
finder-inf vc-backup-autoloads compat-autoloads icalendar diary-lib
diary-loaddefs cal-menu calendar cal-loaddefs rx filecache
imenu-xref-autoloads derived chemtable-autoloads molar-mass-autoloads
saveplace-pdf-view saveplace bookmark text-property-search pp
saveplace-pdf-view-autoloads pcase inspector-autoloads xr-autoloads
straight-autoloads cl-seq info cl-extra help-mode straight subr-x
cl-macs gv cl-loaddefs cl-lib bytecomp byte-compile cconv vz-nh-theme
vz-options-theme rmc iso-transl tooltip eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd 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 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 dbusbind
inotify dynamic-setting system-font-setting font-render-setting
x-toolkit xinput2 x multi-tty make-network-process emacs)
Memory information:
((conses 16 259854 135375) (symbols ?0 21282 3) (strings 32 102062 4733) (string-bytes 1 5042599) (vectors 16 38577) (vector-slots 8 476859 93215)
(floats 8
168 498) (intervals ?8 605 151) (buffers 992 22))
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#57264: 29.0.50; Wrong xcursor colour when over an Emacs frame
2022-08-17 18:38 bug#57264: 29.0.50; Wrong xcursor colour when over an Emacs frame Visuwesh
@ 2022-08-18 2:44 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-18 12:00 ` Visuwesh
0 siblings, 1 reply; 9+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-18 2:44 UTC (permalink / raw)
To: Visuwesh; +Cc: 57264
Visuwesh <visuweshm@gmail.com> writes:
> When the mouse pointer is over an Emacs frame, the xcursor has the wrong
> colour; this is not observed with other Xorg apps like okular,
> libreoffice, ungoogled-chromium.
>
> Emacs has no problem with the default Xorg cursor theme---it is black as
> expected---but this happens when I use the xcursor theme from below.
>
> To reproduce,
>
> 1. Download and install the cursor theme from
> https://π.duncano.de/files/xcursor-plan9-0.2.tar.xz
> 2. Launch emacs -Q as `XCURSOR_THEME=plan9 emacs -Q'.
> 3. Move the cursor over the Emacs frame into a void area and observe
> the left pointer colour. It is white here.
> 4. Now repeat the same but for another application, the left pointer
> colour is black as expected.
>
> Changing the mouse face's :background does not help. It changes the
> border colour. If it gives any clue, I also see this problem with st.
>
> Thanks.
Emacs is doing the right thing here, along with st, xterm, urxvt, et
cetera. The bug lies in the other programs where the cursor is mostly
black with a white border.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#57264: 29.0.50; Wrong xcursor colour when over an Emacs frame
2022-08-18 2:44 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-18 12:00 ` Visuwesh
2022-08-18 12:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 9+ messages in thread
From: Visuwesh @ 2022-08-18 12:00 UTC (permalink / raw)
To: 57264; +Cc: luangruo
[வியாழன் ஆகஸ்ட் 18, 2022] Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:
> Emacs is doing the right thing here, along with st, xterm, urxvt, et
> cetera. The bug lies in the other programs where the cursor is mostly
> black with a white border.
Almost every Xorg app I have (add mpv, sxiv and meh to the earlier list)
and the root window except st and Emacs shows the right cursor for me.
I'm using the awesome window manager here if it matters.
I could invert the image but that would make it worse on every other
Xorg app I use.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#57264: 29.0.50; Wrong xcursor colour when over an Emacs frame
2022-08-18 12:00 ` Visuwesh
@ 2022-08-18 12:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-18 12:59 ` Visuwesh
2022-08-19 13:34 ` Visuwesh
0 siblings, 2 replies; 9+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-18 12:49 UTC (permalink / raw)
To: Visuwesh; +Cc: 57264
Visuwesh <visuweshm@gmail.com> writes:
> Almost every Xorg app I have (add mpv, sxiv and meh to the earlier list)
> and the root window except st and Emacs shows the right cursor for me.
The cursor theme you sent does not include a replacement for the default
X cursor, so what is being displayed on the root window (given that the
window manager did not define another) is from the default cursor font,
not your cursor theme. mpv also does not set a cursor, but inherits the
cursor from the frame window provided by the window manager.
I am not familar with the other programs, but I'm sure they use the
Xcursor library, which these days has various problems with non-ARGB
cursor bitmaps. Emacs does not and thus behaves correctly.
> I'm using the awesome window manager here if it matters.
I'm not familiar with that window manager, sorry.
> I could invert the image but that would make it worse on every other
> Xorg app I use.
Or perhaps ask those other programs to call XRecolorCursor with the
right colors after loading a core cursor with the Xcursor library.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#57264: 29.0.50; Wrong xcursor colour when over an Emacs frame
2022-08-18 12:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-18 12:59 ` Visuwesh
2022-08-19 1:47 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-19 13:34 ` Visuwesh
1 sibling, 1 reply; 9+ messages in thread
From: Visuwesh @ 2022-08-18 12:59 UTC (permalink / raw)
To: 57264; +Cc: luangruo
[வியாழன் ஆகஸ்ட் 18, 2022] Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:
> Visuwesh <visuweshm@gmail.com> writes:
>
>> Almost every Xorg app I have (add mpv, sxiv and meh to the earlier list)
>> and the root window except st and Emacs shows the right cursor for me.
>
> The cursor theme you sent does not include a replacement for the default
> X cursor, so what is being displayed on the root window (given that the
> window manager did not define another) is from the default cursor font,
> not your cursor theme.
What is the default X cursor, anyway? I thought it was XC_left_ptr [1]
and AFAICT, the theme does have left_ptr.
> mpv also does not set a cursor, but inherits the cursor from the frame
> window provided by the window manager.
I thought this would be the case in some of these programs.
> I am not familar with the other programs, but I'm sure they use the
> Xcursor library, which these days has various problems with non-ARGB
> cursor bitmaps. Emacs does not and thus behaves correctly.
>
>> I'm using the awesome window manager here if it matters.
>
> I'm not familiar with that window manager, sorry.
I took a quick look and it seems to use xcb_cursor_load_cursor.
https://github.com/awesomeWM/awesome/blob/7a8fa9d27a7907ab81e60274c925ba65d10015aa/common/xcursor.c
>> I could invert the image but that would make it worse on every other
>> Xorg app I use.
>
> Or perhaps ask those other programs to call XRecolorCursor with the
> right colors after loading a core cursor with the Xcursor library.
Unfortunately, that would be a huge undertaking.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#57264: 29.0.50; Wrong xcursor colour when over an Emacs frame
2022-08-18 12:59 ` Visuwesh
@ 2022-08-19 1:47 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 9+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-19 1:47 UTC (permalink / raw)
To: Visuwesh; +Cc: 57264
Visuwesh <visuweshm@gmail.com> writes:
> [வியாழன் ஆகஸ்ட் 18, 2022] Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:
>
>> Visuwesh <visuweshm@gmail.com> writes:
>>
>>> Almost every Xorg app I have (add mpv, sxiv and meh to the earlier list)
>>> and the root window except st and Emacs shows the right cursor for me.
>>
>> The cursor theme you sent does not include a replacement for the default
>> X cursor, so what is being displayed on the root window (given that the
>> window manager did not define another) is from the default cursor font,
>> not your cursor theme.
> What is the default X cursor, anyway? I thought it was XC_left_ptr [1]
> and AFAICT, the theme does have left_ptr.
The default X cursor is XC_X_cursor (x-pointer-X-cursor in Emacs.)
> I took a quick look and it seems to use xcb_cursor_load_cursor.
> https://github.com/awesomeWM/awesome/blob/7a8fa9d27a7907ab81e60274c925ba65d10015aa/common/xcursor.c
Right, I think that's also problematic (compared to XCreateFontCursor.)
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#57264: 29.0.50; Wrong xcursor colour when over an Emacs frame
2022-08-18 12:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-18 12:59 ` Visuwesh
@ 2022-08-19 13:34 ` Visuwesh
2022-08-19 14:07 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 9+ messages in thread
From: Visuwesh @ 2022-08-19 13:34 UTC (permalink / raw)
To: Po Lu; +Cc: 57264
[வெள்ளி ஆகஸ்ட் 19, 2022] Po Lu wrote:
> Visuwesh <visuweshm@gmail.com> writes:
>
>> [வியாழன் ஆகஸ்ட் 18, 2022] Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:
>>
>>> Visuwesh <visuweshm@gmail.com> writes:
>>>
>>>> Almost every Xorg app I have (add mpv, sxiv and meh to the earlier list)
>>>> and the root window except st and Emacs shows the right cursor for me.
>>>
>>> The cursor theme you sent does not include a replacement for the default
>>> X cursor, so what is being displayed on the root window (given that the
>>> window manager did not define another) is from the default cursor font,
>>> not your cursor theme.
[ BTW, my window manager shows the left_ptr. ]
>> What is the default X cursor, anyway? I thought it was XC_left_ptr [1]
>> and AFAICT, the theme does have left_ptr.
>
> The default X cursor is XC_X_cursor (x-pointer-X-cursor in Emacs.)
Thanks. But do you know why I am seeing this behaviour? I cannot see
what is wrong with the theme. Supposedly, the input to the xcursorgen
program and the image files are good. I opened the generated Xcursor
file in GIMP and it is also of the expected colours. I am unfortunately
lost and I would be really grateful if you can give any pointers.
BTW, all this made me think: why not let the user set the foreground
colour of the cursor, via the mouse face, too? This would at least
solve my problem immediately despite being an awful hack.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#57264: 29.0.50; Wrong xcursor colour when over an Emacs frame
2022-08-19 13:34 ` Visuwesh
@ 2022-08-19 14:07 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-19 14:47 ` Visuwesh
0 siblings, 1 reply; 9+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-19 14:07 UTC (permalink / raw)
To: Visuwesh; +Cc: 57264
Visuwesh <visuweshm@gmail.com> writes:
> Thanks. But do you know why I am seeing this behaviour? I cannot see
> what is wrong with the theme. Supposedly, the input to the xcursorgen
> program and the image files are good. I opened the generated Xcursor
> file in GIMP and it is also of the expected colours. I am unfortunately
> lost and I would be really grateful if you can give any pointers.
The Xcursor library doesn't set foreground and background colors for
core cursors by default, and the application didn't set them either.
> BTW, all this made me think: why not let the user set the foreground
> colour of the cursor, via the mouse face, too? This would at least
> solve my problem immediately despite being an awful hack.
I think that would work. I will work on it but it may or may not take a
while depending on how busy I am in the next several days.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#57264: 29.0.50; Wrong xcursor colour when over an Emacs frame
2022-08-19 14:07 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-19 14:47 ` Visuwesh
0 siblings, 0 replies; 9+ messages in thread
From: Visuwesh @ 2022-08-19 14:47 UTC (permalink / raw)
To: 57264; +Cc: luangruo
[வெள்ளி ஆகஸ்ட் 19, 2022] Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:
> Visuwesh <visuweshm@gmail.com> writes:
>
>> Thanks. But do you know why I am seeing this behaviour? I cannot see
>> what is wrong with the theme. Supposedly, the input to the xcursorgen
>> program and the image files are good. I opened the generated Xcursor
>> file in GIMP and it is also of the expected colours. I am unfortunately
>> lost and I would be really grateful if you can give any pointers.
>
> The Xcursor library doesn't set foreground and background colors for
> core cursors by default, and the application didn't set them either.
I see, thanks.
>> BTW, all this made me think: why not let the user set the foreground
>> colour of the cursor, via the mouse face, too? This would at least
>> solve my problem immediately despite being an awful hack.
>
> I think that would work. I will work on it but it may or may not take a
> while depending on how busy I am in the next several days.
There's no rush, thanks for all the work you do!
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-08-19 14:47 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-17 18:38 bug#57264: 29.0.50; Wrong xcursor colour when over an Emacs frame Visuwesh
2022-08-18 2:44 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-18 12:00 ` Visuwesh
2022-08-18 12:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-18 12:59 ` Visuwesh
2022-08-19 1:47 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-19 13:34 ` Visuwesh
2022-08-19 14:07 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-19 14:47 ` Visuwesh
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).