X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/db2d879ad4bdd492daee48bf2829760b92d8e50e..ae53c98c9f71acb0876846b9c5b1e56adfdb6186:/src/gtk/clipbrd.cpp diff --git a/src/gtk/clipbrd.cpp b/src/gtk/clipbrd.cpp index a4bf7b6a6f..f4ed88753f 100644 --- a/src/gtk/clipbrd.cpp +++ b/src/gtk/clipbrd.cpp @@ -91,7 +91,7 @@ targets_selection_received( GtkWidget *WXUNUSED(widget), for (unsigned int i=0; ilength/sizeof(GdkAtom); i++) { -/* char *name = gdk_atom_name (atoms[i]); +/* char *name = gdk_atom_name (atoms[i]); if (name) printf( "Format available: %s.\n", name ); */ if (atoms[i] == clipboard->m_targetRequested) @@ -370,6 +370,8 @@ wxClipboard::wxClipboard() m_formatSupported = FALSE; m_targetRequested = 0; + + m_usePrimary = FALSE; } wxClipboard::~wxClipboard() @@ -422,7 +424,7 @@ bool wxClipboard::Open() wxCHECK_MSG( !m_open, FALSE, _T("clipboard already open") ); m_open = TRUE; - + return TRUE; } @@ -492,7 +494,6 @@ bool wxClipboard::AddData( wxDataObject *data ) (gpointer) NULL ); #endif -// printf( "vorher.\n" ); /* Tell the world we offer clipboard data */ if (!gtk_selection_owner_set( m_clipboardWidget, g_clipboardAtom, @@ -502,10 +503,6 @@ bool wxClipboard::AddData( wxDataObject *data ) } m_ownsClipboard = TRUE; -// printf( "nachher.\n" ); - - return TRUE; - if (!gtk_selection_owner_set( m_clipboardWidget, GDK_SELECTION_PRIMARY, GDK_CURRENT_TIME )) @@ -547,7 +544,7 @@ bool wxClipboard::IsSupported( wxDataFormat format ) m_waiting = TRUE; gtk_selection_convert( m_targetsWidget, - g_clipboardAtom, + m_usePrimary?GDK_SELECTION_PRIMARY:g_clipboardAtom, g_targetsAtom, GDK_CURRENT_TIME ); @@ -592,7 +589,7 @@ bool wxClipboard::GetData( wxDataObject *data ) m_waiting = TRUE; gtk_selection_convert( m_clipboardWidget, - g_clipboardAtom, + m_usePrimary?GDK_SELECTION_PRIMARY:g_clipboardAtom, m_targetRequested, GDK_CURRENT_TIME );