GNU bug report logs - #75930
30.0.92; Setting default frame background color messes up mouse pointer

Previous Next

Package: emacs;

Reported by: Lars Rustand <rustand.lars <at> gmail.com>

Date: Wed, 29 Jan 2025 16:37:01 UTC

Severity: normal

Found in version 30.0.92

Full log


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

From: Lars Rustand <rustand.lars <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, 75930 <at> debbugs.gnu.org
Subject: Re: bug#75930: 30.0.92; Setting default frame background color
 messes up mouse pointer
Date: Sat, 01 Feb 2025 00:14:47 +0100
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>
> So now I'm confused: why is this a bug?

I don't know why you are suddenly confused, because the description of
the bug has not changed. I have simply located the exact parts of the
code responsible for (one half of) the problem, i.e. the cause of the
mouse pointer border color being set to the frame background color.

Maybe my description of the issue I observe has not been clear
enough. Since you have not seen it first-hand, I attach an image which
illustrates the difference in mouse pointer caused by setting the
emacs frame background via the --background argument.

(I don't know how well image attachments work, if at all, on the mailing
list, so I apologize if the image does not make it through. Please let
me know if it doesn't reach you.)

The pointer to the left is how it normally looks, when emacs has not
modified it and the original Xorg pointer is still intact. As you can see
it is very easily visible, even against a dark background, thanks to
the border color.

The pointer on the right is the result of setting the frame background
color through the --background argument. As you can see the pointer is
now much less visible, since the border around the pointer is the exact
same color as the frame background.

Note that in neither of the examples have I set any custom mouse color,
so I would expect it to remain unchanged in both.



After finding the code I pointed to in my previous message, I realized
that this is in fact a two-part problem.

Part 1 is that x_set_mouse_color incorrectly uses the background color
of the current (or default?) frame as the color of the border/outline
of the mouse pointer. This makes that border in effect become
completely invisible when hovering over the emacs frame, which can make
the mouse pointer very hard to see.

Part 2 is that the act of setting a default frame background color
causes x_set_mouse_color to even be called in the first place. The mouse
color should obviously not be changed as a side effect of changing the
frame background color. These are two very different things that has
nothing to do with eachother.


I have identified the cause of part 1, but I have not (yet) found the
cause of part 2.

[pointers-sideby-side.png (image/png, attachment)]

This bug report was last modified 120 days ago.

Previous Next


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