screen_share_display_buffers()

Cause a window to display content visible on another display

Synopsis:

#include <screen/screen.h>
int screen_share_display_buffers(screen_window_t win,
                                 screen_display_t share,
                                 int count)

Arguments:

win
The handle of the window that the display is sharing its buffer(s) with.
share
The handle of the display who is sharing its buffer(s) with the specified window.
count
The number of buffers that is shared by the display and the window. Use a count of 0 to ensure that the number of buffers shared by the window matches that of the display.

Library:

libscreen

Description:

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().

Returns:

0 if successful, or -1 if an error occurred (errno is set; refer to errno.h for more details).