XScreenSaver, Wayland and locking.

Welp, I got crickets in answer to my question, "How do I find the wl_surface backing an Xwayland X11 Window?" and that does not bode well for XScreenSaver ever being able to lock your screen on Wayland. The only...
https://jwz.org/b/ykrj

@jwz I haven't done much X programming since you and I last met at the Raleigh Linux Expo, so I don't really understand the question or answer, but Clade did some deep research and came up with:

To find the wl_surface backing an Xwayland X11 Window, you need to:

1. Legacy method: Listen for WL_SURFACE_ID ClientMessage on X11 windows (requires SubstructureRedirect on root
window), extract the surface ID from data.l[0], but beware of race conditions.

...

@jwz ...

2. Modern method: Use the xwayland-shell-v1 Wayland protocol with WL_SURFACE_SERIAL ClientMessage to establish a
robust, race-free association.

For xscreensaver, this requires becoming a hybrid X11/Wayland compositor to properly map screensaver windows, which
is a significant architectural change.

@jwz Here is the full answer by Claude: https://pastebin.com/XF1Jxxq2
● TL;DR To find the wl_surface backing an Xwayland X11 Window, you need to: - Pastebin.com

Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

Pastebin

@jafo You just pasted un-tested and un-verified AI slop at me?

Are you fucking *kidding* me??

@jwz Yeah, that's pretty much the response I expected. I did spend $4 on something which I hoped might have had an idea you weren't aware of, particularly as you "got crickets" previously, but I'll admit I'm not surprised by your response. I'm sorry it was, apparently, of zero use and wasted your time. I'd have appreciated if you acked that I spent some of my time and literally money and giving a TL;DR so you could say "tried it" and move on with your life, but again, not surprised.

@jafo Not only was it unhelpful, it was the diametric opposite of helpful. You used the rainforest-incinerating autocomplete plausible-lie-generator to not only not answer my question, but also remind me that I share a planet with people who don't understand why this is not a good idea.

"Everyone in this room is now dumber for having listened to it. I award you no points, and may God have mercy on your soul."

@jwz @jafo reminds me of Cloudflare using AI to vibe code an oath library despite many warnings. Claims were made, but they still ended up with serious exploits. Just because the AI claims something about low-level, technical code that does not mean anything is accurate... only that it *seems* accurate.