src/gui/kernel/qclipboard_x11.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
    76 #include "qt_x11_p.h"
    76 #include "qt_x11_p.h"
    77 #include "qx11info_x11.h"
    77 #include "qx11info_x11.h"
    78 #include "qimagewriter.h"
    78 #include "qimagewriter.h"
    79 #include "qvariant.h"
    79 #include "qvariant.h"
    80 #include "qdnd_p.h"
    80 #include "qdnd_p.h"
       
    81 #include <private/qwidget_p.h>
    81 
    82 
    82 #ifndef QT_NO_XFIXES
    83 #ifndef QT_NO_XFIXES
    83 #include <X11/extensions/Xfixes.h>
    84 #include <X11/extensions/Xfixes.h>
    84 #endif // QT_NO_XFIXES
    85 #endif // QT_NO_XFIXES
    85 
    86 
   129     owner->setObjectName(QLatin1String("internal clipboard owner"));
   130     owner->setObjectName(QLatin1String("internal clipboard owner"));
   130     owner->createWinId();
   131     owner->createWinId();
   131     requestor = new QWidget(0);
   132     requestor = new QWidget(0);
   132     requestor->createWinId();
   133     requestor->createWinId();
   133     requestor->setObjectName(QLatin1String("internal clipboard requestor"));
   134     requestor->setObjectName(QLatin1String("internal clipboard requestor"));
       
   135     // We dont need this internal widgets to appear in QApplication::topLevelWidgets()
       
   136     if (QWidgetPrivate::allWidgets) {
       
   137         QWidgetPrivate::allWidgets->remove(owner);
       
   138         QWidgetPrivate::allWidgets->remove(requestor);
       
   139     }
   134     qAddPostRoutine(cleanup);
   140     qAddPostRoutine(cleanup);
   135 }
   141 }
   136 
   142 
   137 
   143 
   138 class QClipboardWatcher : public QInternalMimeData {
   144 class QClipboardWatcher : public QInternalMimeData {
   767     // timed out ... create a new requestor window, otherwise the requestor
   773     // timed out ... create a new requestor window, otherwise the requestor
   768     // could consider next request to be still part of this timed out request
   774     // could consider next request to be still part of this timed out request
   769     delete requestor;
   775     delete requestor;
   770     requestor = new QWidget(0);
   776     requestor = new QWidget(0);
   771     requestor->setObjectName(QLatin1String("internal clipboard requestor"));
   777     requestor->setObjectName(QLatin1String("internal clipboard requestor"));
       
   778     // We dont need this internal widget to appear in QApplication::topLevelWidgets()
       
   779     if (QWidgetPrivate::allWidgets)
       
   780         QWidgetPrivate::allWidgets->remove(requestor);
   772 
   781 
   773     return QByteArray();
   782     return QByteArray();
   774 }
   783 }
   775 
   784 
   776 static Atom send_targets_selection(QClipboardData *d, Window window, Atom property)
   785 static Atom send_targets_selection(QClipboardData *d, Window window, Atom property)