I-beam cursor color changing based on the background
Bill Spitzak
spitzak at gmail.com
Thu Oct 15 08:30:31 PDT 2015
That's xor of the color bits. The blue/red is due to xor'ing with the
subpixel antialiasing. It is more obvious if you put the cursor over a
solid colored area where you will see strange colors.
It cannot be achieved with Porter-Duff combinations. I am not sure if
OpenGL or DirectX supports it. I am also suspicious that overlay
hardware designed for cursors may not support it either.
This would either require adding something to Wayland to enable xor of a
cursor, or (more likely) you will have to just set the cursor to blank
and draw the desired graphics yourself.
Linux programs seem to use a white insertion bar with a black outline,
so it is visible against all backgrounds. This is despite the fact that
X11 still supports xor cursors, everybody dropped that as obsolete. OS/X
appears to use a black insertion bar with a very thin white outline (ie
partially-transparent white pixels). Both of these work with normal
compositing.
On 10/14/2015 06:13 AM, John Doerthy wrote:
> Hi,
> Could you please comment on this issue, if you are currently working on
> the Windows-like implementation of the I-beam cursor (cursor for text
> selection) in the graphical interface?
> In Windows, the I-beam cursor, change color based on the background. So,
> most of the time it's black, but when you are on the dark background its
> color cahnges and not only that, but if part of the cursor is on the
> white background and part on the dark background, only the affected
> areas of teh I-beam cursor change the color. Plus if you are over a text
> the part of the cursor that overlays some character has a slightly blue
> or red color (as you can see in the screenshots below)
> Here are some real world examples(screenshots) from Windows 7:
> http://imgur.com/a/IxG7w
> Thank for your response how far are you guys in implementing this feature.
> John
>
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
More information about the wayland-devel
mailing list