00:36danieldg: riteo: I expect you treat it like any other surface: request fractional scale, make a viewporter scaled surface, and generally leave the hotpoint alone
00:38danieldg: unless something else about cursors is different? They are more likely to need the compositor to scale them when they cross monitors that change scale, I guess
01:17riteo: danieldg: shouldn't I also care about the new actual buffer size?
01:18riteo: like, if the scaled result is 24 * 1.5 = 36, shouldn't I somehow load the proper theme size?
01:18riteo: or should I just cache the biggest size I encountered yet and let it be downscaled?
01:20danieldg: if your cursors are bitmaps, then you should probably grab the largest one and let it be scaled, or pick one that is the right size at the moment
01:21danieldg: though I expect a bit of 'how does GTK do it' experimentation may be desired, because it's worse to be inconsistent
01:22riteo: I think that they're always rasterized into constant-sized buffers
01:22riteo: so if I don't somehow switch the buffers they're gonna get blurry
01:22danieldg: yes, you switch the buffers
01:22riteo: I suppose that there's gonna be overhead if I reload the theme with a different size every time, isn't there?
01:23danieldg: you should really only need to reload it once? I guess you could cache sizes if you wanted to switch back and forth
01:23riteo: mh
01:24riteo: for some reason I feel like this is very convoluted
01:24riteo: like, I blindly cache every size or just load the biggest size I've seen even if I'm not going to see it ever again
01:25danieldg: the same is true for everything you draw, really
01:25riteo: mhh I see, you're completely right
01:25danieldg: fonts, icons, etc
01:26riteo: I'm tempted to do what we're already doing with integer scaling, which is, well, keeping only the biggest size we've registered
01:26riteo: so on a 1.25 we'd go to 2 directly and downsample it
01:26riteo: are there going to be aliasing issues?
01:26danieldg: depends on the compositor
01:27danieldg: nothing in wayland specifies how scaling is done
01:27riteo: mh I see
01:27riteo: I'm a bit scared of caching every single size honestly. I'll probably go with the "update only when strictly necessary to not blur into the void for bigger sizes" route
01:27riteo: thanks a lot for your clarifications!
01:28danieldg: if it's a simple cursor theme it might only have a few (3-4) sizes in the first place, so that's all you could cache
01:29riteo: can we even probe available sizes from wayland-cursors?
01:29riteo: the API is just "load theme x with size y"
01:29riteo: also animated cursors are a thing
01:30danieldg: yeah, I basically ignored animation
01:30riteo: btw regarding the GTK consistency thing I'll definitely take a look while testing (eventually), but I'm not too concerned since I recall seeing some GTK bug reports regarding frac scale of cursors
01:30riteo: might be fixed though, can't recall
01:31danieldg: just matching 'how does it handle scale=2' is probably good
01:31riteo: uh that's probably already correct
01:31orowith2os[m]: Standardize loading cursors as vector images, that way you don't have specific sizes :)
01:31riteo: you still have to rasterize them though :P
01:31danieldg: wouldn't that be nice
01:32danieldg: sure, but you just reraster on scale changes, that's fairly sane
01:32riteo: oh you mean like, client side?
01:32danieldg: yes
01:32riteo: that would be very interesting
01:32orowith2os[m]: I'd imagine not too technically impossible
01:32orowith2os[m]: Though a bit painful with animated cursors, like loading
01:32riteo: yeah, we'd just have to define a somewhat sane vector format as I don't really see clients embedding a whole SVG renderer :P
01:32danieldg: you already do that if your GUI is vector anyway
01:33orowith2os[m]: Maybe it could even improve animated cursors? Currently it looks like you store 60 images of one animated cursor and loop over that, if vector formats improve on that, wonderful
01:33orowith2os[m]: riteo: sounds like a fun side project I can hack on
01:33riteo: That'd be great!
01:34riteo: We seriously need better "embedded" vector solutions
01:34riteo: heck, vector's the future! I wish there were more vector solutions in general!
01:34orowith2os[m]: Toss me your discord, I'd also like to poke you about more Godot Wayland stuff too
01:34riteo: oh that'd be great! Although I don't use discord much
01:34danieldg: fonts are vector graphics already, so almost everyone has an engine to do that
01:34riteo: I'll send that in private. If anyone else wants it, feel free to ask
01:35danieldg: the funnier fonts can embed SVG
01:35danieldg: and also PNG
01:36riteo: mh yeah but most fonts are a bit domain-specific, aren't they?
01:36riteo: that's the reason emojis had to get their own format
01:36riteo: what was it, woff?
01:37danieldg: there are still fonts with emojis
01:37riteo: yeah but they embed as you said PNG/SVGs, which aren't really what normal fonts use
01:38danieldg: true, but a font rendering engine kinda has to support them still
01:39riteo: they're not accessible though. Godot, despite using Freetype/Harfbuzz had to import their own full-fledged SVG library
01:39riteo: I think it was ThorVG
01:39danieldg: I guess you can decide not to do that and just have the simple font support, which is a vector format but doesn't do colors so not really good enough for cursors
01:39riteo: yeah that would still cover like 90% of fonts
01:41danieldg: even the most boring cursor is black with white border, which is beyond a TTF file to represent
01:43danieldg: making a new cursor format would be quite a long project; you have to get it in all the toolkits plus all the control-panel-type GUIs
01:44danieldg: it would be nice to add a way other than dconf to specify a per-seat cursor choice, though
01:44danieldg: (actually, can you even do that with dconf?)
01:45danieldg: the normal setting is just "org.gnome.desktop.interface cursor-theme" no mention of seat
01:45riteo: it's a bit funny that cursors were all the rage back then and now they're like an afterthought
01:46riteo: I recall switching an awful lot of sketchy cursor themes on windows 7 when I was a kid
01:47danieldg: windows 3.1 had really cool animated cursors too, so they're pretty old
02:56wlb: wayland Issue #424 opened by M. Stoeckl (mstoeckl) Document that wl_display_connect() is not thread safe https://gitlab.freedesktop.org/wayland/wayland/-/issues/424
03:45DemiMarie: I would much prefer for the system to provide a fixed list of cursors and for the client to have to pick one of them. This is an interface that Qubes OS (and other compartmentalized systems) can actually support. Arbitrary client-provided cursors isn’t, so the compositor I am working on for Qubes OS currently ignores the client-chosen cursor.
03:48wlb: wayland-protocols Issue #166 opened by Dallas Strouse (orowith2os) Pointer confinement: wrapping https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/166
03:50orowith2os[m]: Demi: client-provided cursors wasn't even brought up, I think?
03:51orowith2os[m]: the client can provide cursors of their own, but they can't recommend them to other clients
03:51orowith2os[m]: this is more for cursors when the client has to draw them
03:52DemiMarie: Rika (she/her): in Qubes OS we explicitly do _not_ allow clients to draw arbitrary cursors, because this would allow them to hide the cursor.
03:52orowith2os[m]: you can't disallow that, afaik. It's client opt-in behavior
03:52DemiMarie: And since this was on #_oftc_#wayland:matrix.org, I assumed that it had to do with Wayland as a protocol, rather than being an implementation detail of a given client
03:53DemiMarie: Rika (she/her): clients can set a cursor, but the compositor doesn’t have to use it, and the compositor that I am working on for Qubes OS simply ignores it
03:53orowith2os[m]: do the clients have to set a cursor in that way? can they not skip wl_pointer and draw it themselves?
03:54zamundaaa[m]: One more reason for all the clients to adopt cursor-shape-v1 :)
03:54DemiMarie: Rika (she/her): yes, but that will be more likely to be noticed, or at least that is what I think the theory is
03:54orowith2os[m]: my point is more that you simply can't stop a client from "faking" a cursor icon
03:54DemiMarie: That said, strong anti-spoofing probably requires tinting all untrusted surfaces or something like that
03:55DemiMarie: So that cursors, borders, and other trusted components have a color that no untrusted client can forge
03:55orowith2os[m]: that seems like tons of unnecessary work, but you do you
03:55orowith2os[m]: shouldn't be impossible to implement, in any case
03:55DemiMarie: Right now Qubes OS doesn’t do it, and I don’t know if it is needed in any case
03:56DemiMarie: Security is Hard 😆
03:56orowith2os[m]: unnecessary security is Even Harder :)
03:56orowith2os[m]: I doubt manipulating a client-local cursor image matters at all
03:57DemiMarie: Ideally this would be determined via human interaction studies.
04:00orowith2os[m]: in any case,
04:00orowith2os[m]: issue 166
04:00orowith2os[m]: do take a peek
04:00orowith2os[m]: it sounds like, currently, clients wanting that behavior rely on UB
04:00orowith2os[m]: so let's make it defined
04:14orowith2os[m]: Demi: what's your gitlab username?
04:16orowith2os[m]: nvm, got it
04:57Company: playing around with pointer warping and mouse cursor offsets sounds like a fun way to learn information about the system
04:57Company: by checking where the user clicks
04:58Company: though I suppose it's easier to fake by doing a transparent fullscreen window
06:56DemiMarie: Company: This is why Qubes OS does not support transparency.
06:58Company: that's an easy workaround for that stuff at least
06:58DemiMarie: Yup
06:59DemiMarie: At least my personal expectation is that applications should work on Qubes OS, but some features may be missing.
07:06DemiMarie: On the other hand, Qubes OS will require the desktop environment to support layer-shell, so it is expected that some desktop environments cannot be supported.
07:29DemiMarie: Company: this is _not_ an anti-GNOME rant, FYI. GNOME being opinionated is perfectly okay, but it does make it unsuitable for Qubes OS.
07:40Company: DemiMarie: why would you need layer-shell?
07:42DemiMarie: Company: Qubes OS has custom desktop environment components and reimplementing them for each supported desktop environment isn’t practical.
07:43Company: that sounds like you should just implement a compositor
07:44DemiMarie: We don’t have the resources to do that, and besides not everyone will want to run the same compositor.
07:44DemiMarie: Better to leave that to the people who actually know how to do that.
07:45Company: you can't really enforce no transparency in that case though?
07:46DemiMarie: Actually we can, by proxying the Wayland protocol and e.g. replacing ARGB with XRGB.
07:46DemiMarie: If it turns out that we do need to write our own compositor, it will be a rootless nested compositor, so we will still need layer-shell support from the desktop environment.
07:47DemiMarie: A Qubes-specific user-facing compositor isn’t going to happen.
07:49Company: I would think this is a much more time-intensive approach
07:50Company: trying to force external compositors into submission sounds a lot harder than just creating your own one
07:50Company: that doesn't do the stuff you don't want to do
22:01DemiMarie: Company: A nested compositor might be a good idea, but it won’t be user-facing.