X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/93c5dd39af2fb5eb12c5c837999be944543b21b0..0aca1ded9ce90a6d5f560c2617df1ef5089c789b:/src/gtk/clipbrd.cpp diff --git a/src/gtk/clipbrd.cpp b/src/gtk/clipbrd.cpp index 2d056fc1ed..3eb5d9b886 100644 --- a/src/gtk/clipbrd.cpp +++ b/src/gtk/clipbrd.cpp @@ -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)