Live data from Hacker News

Improving cursor rendering on Wayland

blog.vaxry.net

11–20 of 134 posts

Re: Improving cursor rendering on Wayland

#11
post #6
post #2

xorg and it's problems is so funny

It's a Wayland problem if it is really problem at all though. The author complains that XCursor themes take too much space on disk (They will live uncompressed in VRAM anyways). Considering we are talking about Megabytes in the age of Terabytes HDDs, as long as you don't want to install thousands of XCursor themes on the same machine this is really a non-issue.

Another more important problem discussed is a lack of cursor sizes.

Re: Improving cursor rendering on Wayland

#12
post #10

What is this config.hl file format? At first, I thought it’s hlc [0], but I couldn’t find confirmation in the git repo either. [0]: https://www.linode.com/docs/guides/introduction-to-hcl/

It's the hyperland https://hyprland.org> config format.

Re: Improving cursor rendering on Wayland

#13
post #8
post #4

Earlier quoted context omitted.

It's a wholly expected punchline to anything wayland: by most accounts Gnome is one of the worst offenders in the death-by-comittee wasteland that is standardising protocols in wayland.

As far as I can tell, nobody has filed an issue on Gitlab for wp-cursor-shape, nor posted an MR. https://gitlab.gnome.org/GNOME/gtk/-/merge_requests?search=w... https://gitlab.gnome.org/GNOME/gtk/-/issues/?search=wp-curso... Nothing on Mutter either: https://gitlab.gnome.org/GNOME/mutter/-/issues/?search=wp-cu... https://gitlab.gnome.org/GNOME/mutter/-/merge_requests?searc... It looks like the old GTK mailing lists w…

https://gitlab.gnome.org/GNOME/mutter/-/issues/3276 ?

Re: Improving cursor rendering on Wayland

#14
post #9

"Well lol just draw a png haha Well, no, it's not that simple. Rasters are annoying. Raster means an image is stored with pixels, for example a png, or an mp4. The problem with rasters is that when you resize them, the computer has to take a wild guess at what it should look like." The problem with any display this software is going to run on is that it is also made with pixels. GTK foundation tried this approach for…

By this argument now that GTK supports directly rendering vector fonts sharply at arbitrary pixel densities we should switch back to bitmap fonts so GTK fonts can be bitmap rescaled again. I.e. the recent GTK reckoning you're referring to is actually about avoiding an extra raster rescale for exactly the reasons quoted, not about wanting more of it.

Re: Improving cursor rendering on Wayland

#15
post #8

Earlier quoted context omitted.

As far as I can tell, nobody has filed an issue on Gitlab for wp-cursor-shape, nor posted an MR. https://gitlab.gnome.org/GNOME/gtk/-/merge_requests?search=w... https://gitlab.gnome.org/GNOME/gtk/-/issues/?search=wp-curso... Nothing on Mutter either: https://gitlab.gnome.org/GNOME/mutter/-/issues/?search=wp-cu... https://gitlab.gnome.org/GNOME/mutter/-/merge_requests?searc... It looks like the old GTK mailing lists w…

https://gitlab.gnome.org/GNOME/mutter/-/issues/3276 ?

Gah, everyone uses different nomenclature when referring to Wayland protocols. Here's an MR for GTK:

https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6212

No negative signals for either Mutter or GTK here, but no strong positive signals either. Let's make sure we add our thumbs up, at least.

Re: Improving cursor rendering on Wayland

#17
post #10

What is this config.hl file format? At first, I thought it’s hlc [0], but I couldn’t find confirmation in the git repo either. [0]: https://www.linode.com/docs/guides/introduction-to-hcl/

It's the hyperland https://hyprland.org > config format.

Hmm, this leaves me with mixed feelings. It's obviously easier if everyone just adopts libhyprcursor instead of implementing a spec themselves and everyone having to iron out interoperability issues. Hyprlang doesn't look large, it's probably on the same order of magnitude as your average JSON decoder/encoder, but OTOH it's kind of a bespoke language versus other more "standard" options and I think this is likely to hinder adoption more than anything else. It's another "thing" whereas the desktop is already full of INIs, XMLs and JSON files.

Then again, I have no stake in the matter. I think if Vaxry wants this to be adopted though, dropping it onto the world like this is probably not the most likely case to get there. It probably would've been worth bugging maintainers for other compositors (kwin, sway?) to see if they had any input/thoughts on the matter. I can only imagine Hyprlang as a dependency would've come up immediately as a discussion topic (I could be very wrong though.)

Re: Improving cursor rendering on Wayland

#18
I've been experimenting with using Hyprland (a Wayland WM) on my laptop, and ironically Qt apps have been the ones that misbehave the most. Everything seems happy to use my preferred icon theme, but when hovering over a Qt app, the sizing greatly changes. I've mostly just gotten used to it (plus I never really got their overall theming correct) but I might have to try this out and see if it fixes my issues.

Re: Improving cursor rendering on Wayland

#19
> In the beginning of wayland, and in the core design spec, it's the client's job to draw the cursor. I mean, it kind of makes sense, as some apps might want to draw a custom cursor (e.g. games)

Wait what. That's even more insane than client-side decorations.

Re: Improving cursor rendering on Wayland

#20

How are cursors stored and drawn on let's say macOS? Honest question, comparing with X is easy but not exactly state of the art.

TL;DR: it's integrated with the rest of Cocoa.

macOS cursors are provided by an NSCursor class which can either be one of the standard cursor image or provided through an NSImage object, which supports a number of data types (among the usual pixel-based formats like PNG or JPEG also PDF), it looks like applications can also register their own data formats via a class called NSImageRep.

Post reply on HN