X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c698eae5a875ca973df44add1ad67ec69a5754ba..3454ecd508f3d5a2a31f1c1d9048de80763135d1:/src/motif/clipbrd.cpp diff --git a/src/motif/clipbrd.cpp b/src/motif/clipbrd.cpp index 275c02fd53..4af95a45ad 100644 --- a/src/motif/clipbrd.cpp +++ b/src/motif/clipbrd.cpp @@ -9,11 +9,14 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation #pragma implementation "clipbrd.h" #endif +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + #ifdef __VMS #include "wx/vms_x_fix.h" #define XtWindow XTWINDOW @@ -195,7 +198,7 @@ wxClipboard::~wxClipboard() void wxClipboard::Clear() { - wxDataObjectList::Node* node = m_data.GetFirst(); + wxDataObjectList::compatibility_iterator node = m_data.GetFirst(); while (node) { delete node->GetData(); @@ -203,7 +206,7 @@ void wxClipboard::Clear() } m_data.Clear(); - for( wxDataIdToDataObjectList::Node* node2 = m_idToObject.GetFirst(); + for( wxDataIdToDataObjectList::compatibility_iterator node2 = m_idToObject.GetFirst(); node2; node2 = node2->GetNext() ) delete node->GetData(); m_idToObject.Clear(); @@ -244,7 +247,7 @@ void wxClipboardCallback( Widget xwidget, long* data_id, wxDataObject* dobj = NULL; size_t size = 0; - for( wxDataIdToDataObjectList::Node* node2 = + for( wxDataIdToDataObjectList::compatibility_iterator node2 = wxTheClipboard->m_idToObject.GetFirst(); node2; node2 = node2->GetNext() ) { @@ -280,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 ); @@ -330,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; @@ -390,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;