+ if (event->selection == GDK_SELECTION_PRIMARY)
+ {
+ wxTheClipboard->m_ownsPrimarySelection = FALSE;
+ }
+ else
+ if (event->selection == g_clipboardAtom)
+ {
+ wxTheClipboard->m_ownsClipboard = FALSE;
+ }
+ else
+ {
+ return FALSE;
+ }
+
+ if ((!wxTheClipboard->m_ownsPrimarySelection) &&
+ (!wxTheClipboard->m_ownsClipboard))
+ {
+ /* the clipboard is no longer in our hands. we can the clipboard data. */
+
+ if (wxTheClipboard->m_dataBroker)
+ {
+ delete wxTheClipboard->m_dataBroker;
+ wxTheClipboard->m_dataBroker = (wxDataBroker*) NULL;
+ }
+ }