-
Notifications
You must be signed in to change notification settings - Fork 29
Capture individual windows/surfaces? #93
Comments
The initial plan was to somehow let screencopy and export-dmabuf to accept a foreign toplevel handle. |
We have implemented that in phoc/phosh as part of the initial window thumbnail implementation. There's a request in the private protocol that takes Some insights:
|
One more thing to note, although that one is more related to implementation than the protocol: in order to prevent race conditions, the capture/composition part needs to happen already when |
Right. If ever supported, it would be an optional optimization, which would only work in very specific cases. Probably not worth the trouble TBH.
Right. I wonder if a protocol to produce virtual
Yeah. That's a more general issue with Wayland protocols, maybe worth opening an issue in the Wayland bug tracker?
Yeah, at least some of it is tracked in #82 I believe?
Maybe it would be better if the client could specify that it wants the children toplevels blended on the buffer as well?
Hrm, that's pretty annoying. Can't we just handle the resizes more gracefully in screencopy, and ask the client to provide a new buffer with the correct size? |
wlr-protocols has migrated to gitlab.freedesktop.org. This issue has been moved to: https://gitlab.freedesktop.org/wlroots/wlr-protocols/-/issues/93 |
The screencopy protocol doesn't seem to have a great way to capture individual windows (toplevel surfaces?). It might be able to build something to do this using sway ipc to get the region for a window and tracking its movement (if capturing video and not a single frame), but such a solution would be sway-specific. Would it be feasible to add a way for a client to specify a toplevel surface to capture rather than an output or region?
The biggest obstacle I see is how the client would choose which window to capture. The client may want the user to select the desired window by clicking on the window directly (something like slurp, but get a handle to the surface instead of coordinates) or give the user a menu of windows to select from. The menu might be possible using the foreign_toplevel protocol, but I'm not sure how to accomplish something like clicking on the window directly.
See also: emersion/xdg-desktop-portal-wlr#12 (comment)
The text was updated successfully, but these errors were encountered: