]> git.saurik.com Git - wxWidgets.git/commitdiff
Attempt to add primary selection support, but doesn't work.
authorKarsten Ballüder <ballueder@usa.net>
Thu, 10 Jun 1999 17:13:28 +0000 (17:13 +0000)
committerKarsten Ballüder <ballueder@usa.net>
Thu, 10 Jun 1999 17:13:28 +0000 (17:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/clipbrd.cpp
src/gtk1/clipbrd.cpp

index a4bf7b6a6fbebecd5d955decd45f41440b985cba..966eb2d3ca8943b4e5c32cd603efb15630dd5284 100644 (file)
@@ -422,7 +422,8 @@ bool wxClipboard::Open()
     wxCHECK_MSG( !m_open, FALSE, _T("clipboard already open") );
   
     m_open = TRUE;
     wxCHECK_MSG( !m_open, FALSE, _T("clipboard already open") );
   
     m_open = TRUE;
-  
+    UsePrimarySelection(FALSE);
+    
     return TRUE;
 }
 
     return TRUE;
 }
 
@@ -547,7 +548,7 @@ bool wxClipboard::IsSupported( wxDataFormat format )
     m_waiting = TRUE;
 
     gtk_selection_convert( m_targetsWidget,
     m_waiting = TRUE;
 
     gtk_selection_convert( m_targetsWidget,
-                          g_clipboardAtom, 
+                          m_usePrimary?GDK_SELECTION_PRIMARY:g_clipboardAtom, 
                           g_targetsAtom,
                           GDK_CURRENT_TIME );
 
                           g_targetsAtom,
                           GDK_CURRENT_TIME );
 
@@ -592,7 +593,7 @@ bool wxClipboard::GetData( wxDataObject *data )
     m_waiting = TRUE;
 
     gtk_selection_convert( m_clipboardWidget,
     m_waiting = TRUE;
 
     gtk_selection_convert( m_clipboardWidget,
-                          g_clipboardAtom, 
+                          m_usePrimary?GDK_SELECTION_PRIMARY:g_clipboardAtom, 
                           m_targetRequested,
                           GDK_CURRENT_TIME );
   
                           m_targetRequested,
                           GDK_CURRENT_TIME );
   
index a4bf7b6a6fbebecd5d955decd45f41440b985cba..966eb2d3ca8943b4e5c32cd603efb15630dd5284 100644 (file)
@@ -422,7 +422,8 @@ bool wxClipboard::Open()
     wxCHECK_MSG( !m_open, FALSE, _T("clipboard already open") );
   
     m_open = TRUE;
     wxCHECK_MSG( !m_open, FALSE, _T("clipboard already open") );
   
     m_open = TRUE;
-  
+    UsePrimarySelection(FALSE);
+    
     return TRUE;
 }
 
     return TRUE;
 }
 
@@ -547,7 +548,7 @@ bool wxClipboard::IsSupported( wxDataFormat format )
     m_waiting = TRUE;
 
     gtk_selection_convert( m_targetsWidget,
     m_waiting = TRUE;
 
     gtk_selection_convert( m_targetsWidget,
-                          g_clipboardAtom, 
+                          m_usePrimary?GDK_SELECTION_PRIMARY:g_clipboardAtom, 
                           g_targetsAtom,
                           GDK_CURRENT_TIME );
 
                           g_targetsAtom,
                           GDK_CURRENT_TIME );
 
@@ -592,7 +593,7 @@ bool wxClipboard::GetData( wxDataObject *data )
     m_waiting = TRUE;
 
     gtk_selection_convert( m_clipboardWidget,
     m_waiting = TRUE;
 
     gtk_selection_convert( m_clipboardWidget,
-                          g_clipboardAtom, 
+                          m_usePrimary?GDK_SELECTION_PRIMARY:g_clipboardAtom, 
                           m_targetRequested,
                           GDK_CURRENT_TIME );
   
                           m_targetRequested,
                           GDK_CURRENT_TIME );