Capture individual windows/surfaces?
Created by: tmccombs
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.