Demonstrate content sharing between windows



Runs on:

QNX Neutrino




The sharewin binary is a command-line application that demonstrates how to share content between windows. This application creates five windows. However, only four windows are visible, and these four windows each share (by calling screen_share_window_buffers()) the window buffer of the remaining invisible window.

Rendering is performed only on the window that's invisible. When the invisible window calls screen_post_window(), you can see updates to the content of the other four visible windows because they are sharing the buffer of the invisible window.

The four visible windows, each specify a different region of the invisble window's buffer.

To run sharewin:

  1. Ensure that screen is running.
  2. Run sharewin from a shell.