▲ | porridgeraisin 2 days ago | ||||||||||||||||
This should be possible on X11 using standard extensions. XCompositeRedirectWindow to render your window to a virtual buffer, get pixmap, bind pixmap to new croppedWindow as a GL texture, here apply a crop transform. Then optionally unmap original window. Finally, we have to remap input events. This is trivial browser-style event interception, XSelectInput, change x,y, XSendEvent. I can try to make it work sometime this week. A CLI tool you'd use like `xcropwindow windowID x y dx dy`. As a side effect, this way you can have multiple viewports into different parts of a window. But there's probably a few deal-breaker edge cases I'm missing. On the other hand, the Great Wayland Security Theater probably doesn't admit such riff-raff. | |||||||||||||||||
▲ | wing-_-nuts 2 days ago | parent | next [-] | ||||||||||||||||
>On the other hand, the Great Wayland Security Theater probably doesn't admit such riff-raff. I really tried switching over to sway / wayland a couple years back, but there were just so. many. things. which, despite wayland being 'the future' and 'ready for prime time' among proponents just bugged the heck out of me. Why is it an act of congress to setup screen sharing / recording. Like sure it works for this one fork of OBS but if I'm trying to set up a telehealth session with my doctor all of a sudden I can't share my screen? Or global hotkeys don't work? I can't easily redshift my monitor at night? Pulse audio is jank for some unknown reason (Idk if this was even related) It was just death by a thousand cuts. When it really came down to it, wayland added nothing but headaches to my life without any discernible benefit. None of it's 'selling points' meant anything to me. Then suddenly I remembered I'm no longer the early adopter / OSS enthusiast I was in my youth. I'm now a grumpy grey beard who just wants things to work. I installed pop 22 with gnome on xorg and went on with my life. I think it's pretty telling that cosmic was released in alpha this time last year and it's still there today. While I realize that writing a DE is a big undertaking, they were basically trying for a fresh rewrite of gnome's UI in rust under wayland. No way it would have taken this long if they were targeting x. | |||||||||||||||||
| |||||||||||||||||
▲ | yjftsjthsd-h 2 days ago | parent | prev [-] | ||||||||||||||||
> On the other hand, the Great Wayland Security Theater probably doesn't admit such riff-raff. I'm pretty sure it's doable, but it probably does need to be baked into the compositor. But since there are compositors that can do full immersive 3D environments with windows moving around in them, I can't believe that there's any manipulation of the contents of a window that you can't do in Wayland. Of course, being able to add it as tiny helper program is probably something that's going to be specific to X11, or possibly (best case) require non-portable APIs that are specific to individual compositors in Wayland. | |||||||||||||||||
|