-
- if (!compound_text_atom)
- compound_text_atom = gdk_atom_intern("COMPOUND_TEXT", FALSE);
- if (!utf8_string_atom)
- utf8_string_atom = gdk_atom_intern("UTF8_STRING", FALSE);
-
- /*
- * Ensure that all the cut buffers exist - according to the
- * ICCCM, we must do this before we start using cut buffers.
- */
- XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
- XA_CUT_BUFFER0, XA_STRING, 8, PropModeAppend, empty, 0);
- XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
- XA_CUT_BUFFER1, XA_STRING, 8, PropModeAppend, empty, 0);
- XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
- XA_CUT_BUFFER2, XA_STRING, 8, PropModeAppend, empty, 0);
- XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
- XA_CUT_BUFFER3, XA_STRING, 8, PropModeAppend, empty, 0);
- XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
- XA_CUT_BUFFER4, XA_STRING, 8, PropModeAppend, empty, 0);
- XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
- XA_CUT_BUFFER5, XA_STRING, 8, PropModeAppend, empty, 0);
- XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
- XA_CUT_BUFFER6, XA_STRING, 8, PropModeAppend, empty, 0);
- XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
- XA_CUT_BUFFER7, XA_STRING, 8, PropModeAppend, empty, 0);
-}
-
-/* Store data in a cut-buffer. */
-void store_cutbuffer(char *ptr, int len)
-{
- /* ICCCM says we must rotate the buffers before storing to buffer 0. */
- XRotateBuffers(GDK_DISPLAY(), 1);
- XStoreBytes(GDK_DISPLAY(), ptr, len);