Cause a window to display content visible on another display
#include <screen/screen.h>
int screen_share_display_buffers(screen_window_t win, screen_display_t share, int count)
Function Type: Flushing Execution
The specified display shares its buffers with the specified window win. This method of buffer sharing results in the window's buffers having the same content as the display. For more information, see the "Displays" section of the Resource Sharing chapter of the Screen Developer's Guide.
To share display buffers, you need to be working within a privileged context. Therefore, a context that was created with the type SCREEN_DISPLAY_MANAGER_CONTEXT must be used.
If the display has a framebuffer, then screen_share_display_buffers() is similar to screen_share_window_buffers().
0 if successful, or -1 if an error occurred (errno is set; refer to errno.h for more details).