This example shows how to obtain the sensitivity label for a window. The process sensitivity label equals the window sensitivity label. Therefore, no privileges are required.
/* Retrieve window label */
retval = XTSOLgetResLabel(display, window, IsWindow, &senslabel);
/* Translate labels to string and print */
retval = label_to_str(label, &string, M_LABEL, LONG_NAMES);
printf("Label = %s\n", string);The printf statement, for example, prints the following:
Label = PUBLIC