]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/clipbrd.cpp
OSX only (a runtime check would be preferable as Kevin mentioned
[wxWidgets.git] / src / motif / clipbrd.cpp
index 2f8d636d09bda60f0ba5966ecaa2becc1a643b3f..4af95a45ad40e73fbfca02cd8345d6c7477e67cb 100644 (file)
@@ -283,7 +283,7 @@ bool wxClipboard::AddData( wxDataObject *data )
     m_data.Append( data );
 
     Display* xdisplay = wxGlobalDisplay();
-    Widget xwidget = (Widget)wxTheApp->GetTopLevelWidget();
+    Widget xwidget = (Widget)wxTheApp->GetTopLevelRealizedWidget();
     Window xwindow = XtWindow( xwidget );
     wxXmString label( wxTheApp->GetAppName() );
     Time timestamp = XtLastTimestampProcessed( xdisplay );
@@ -333,7 +333,7 @@ void wxClipboard::Close()
 bool wxClipboard::IsSupported(const wxDataFormat& format)
 {
     Display* xdisplay = wxGlobalDisplay();
-    Window xwindow = XtWindow( (Widget)wxTheApp->GetTopLevelWidget() );
+    Window xwindow = XtWindow( (Widget)wxTheApp->GetTopLevelRealizedWidget() );
     bool isSupported = false;
     int retval, count;
     unsigned long  max_name_length;
@@ -393,7 +393,7 @@ bool wxClipboard::GetData( wxDataObject& data )
     wxCHECK_MSG( m_open, false, "clipboard not open" );
 
     Display* xdisplay = wxGlobalDisplay();
-    Window xwindow = XtWindow( (Widget)wxTheApp->GetTopLevelWidget() );
+    Window xwindow = XtWindow( (Widget)wxTheApp->GetTopLevelRealizedWidget() );
     Time timestamp = XtLastTimestampProcessed( xdisplay );
 
     wxDataFormat chosenFormat;