Send a request to the composition manager to destory the buffer of the specified window.
#include <screen/screen.h>
int screen_destroy_window_buffers(screen_window_t win)
The handle of the window whose buffer(s) you want to destroy.
Function Type: Flushing Execution
This function releases the buffer that was allocated for a window, without destroying the window. If the buffer was created with screen_create_window_buffer(), the memory is released and can be used for other window or pixmap buffers. If the buffer was attached using screen_attach_window_buffer(), the buffer is destroyed but no memory is actually released. In this case the application is responsible for freeing the memory after calling screen_destroy_window_buffer(). Once a window buffer has been destroyed, you can change the format, the usage and the buffer size before creating a new buffer again. The memory that is released by this call is not reserved and can be used for any subsequent buffer allocation by the windowing system.
0 if the memory used by the window buffer was freed, or -1 if an error occurred (errno is set).