]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/clipbrd.cpp
Added rc and def files for new samples
[wxWidgets.git] / src / gtk / clipbrd.cpp
index 2d056fc1ed93b0e9f7d2430821aed54e631bfb89..3eb5d9b886df011b367cc82706910a7c031dc84b 100644 (file)
@@ -224,6 +224,7 @@ selection_clear_clip( GtkWidget *WXUNUSED(widget), GdkEventSelection *event )
     }
     else
     {
+        wxTheClipboard->m_waiting = FALSE;
         return FALSE;
     }
     
@@ -239,6 +240,7 @@ selection_clear_clip( GtkWidget *WXUNUSED(widget), GdkEventSelection *event )
        }
     }
   
+    wxTheClipboard->m_waiting = FALSE;
     return TRUE;
 }
 
@@ -262,7 +264,7 @@ selection_handler( GtkWidget *WXUNUSED(widget), GtkSelectionData *selection_data
        if (data_object->GetFormat().GetAtom() != selection_data->target)
        {
            node = node->Next();
-           break;
+           continue;
        }
        
        switch (data_object->GetFormat().GetType())
@@ -388,12 +390,20 @@ void wxClipboard::Clear()
      
         if (gdk_selection_owner_get( g_clipboardAtom ) == m_clipboardWidget->window)
         {
+            m_waiting = TRUE;
+           
             gtk_selection_owner_set( (GtkWidget*) NULL, g_clipboardAtom, GDK_CURRENT_TIME );
+           
+            while (m_waiting) gtk_main_iteration();
         }
     
         if (gdk_selection_owner_get( GDK_SELECTION_PRIMARY ) == m_clipboardWidget->window)
         {
+            m_waiting = TRUE;
+           
             gtk_selection_owner_set( (GtkWidget*) NULL, GDK_SELECTION_PRIMARY, GDK_CURRENT_TIME );
+           
+            while (m_waiting) gtk_main_iteration();
         }
     
         if (m_dataBroker)