summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qclipboard_x11.cpp
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-12 12:35:46 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-12 12:35:46 (GMT)
commitc53414e11b3f980f81a4470b3fb52f9d1aa80d56 (patch)
tree7d51540148af638b1c4fb7cda939d34739245457 /src/gui/kernel/qclipboard_x11.cpp
parentf2b93868f48a3e2d6e462ca8a051ab47eefef49d (diff)
parent304bf2ef0a99882d2d969347f85a330523086fb3 (diff)
downloadQt-c53414e11b3f980f81a4470b3fb52f9d1aa80d56.zip
Qt-c53414e11b3f980f81a4470b3fb52f9d1aa80d56.tar.gz
Qt-c53414e11b3f980f81a4470b3fb52f9d1aa80d56.tar.bz2
Merge commit 'origin/4.5'
Conflicts: demos/boxes/glshaders.cpp src/gui/graphicsview/qgraphicsitem.cpp tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp tools/linguist/shared/cpp.cpp translations/linguist_ja.qm translations/qt_ru.qm
Diffstat (limited to 'src/gui/kernel/qclipboard_x11.cpp')
-rw-r--r--src/gui/kernel/qclipboard_x11.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/kernel/qclipboard_x11.cpp b/src/gui/kernel/qclipboard_x11.cpp
index d7eb111..b85e024 100644
--- a/src/gui/kernel/qclipboard_x11.cpp
+++ b/src/gui/kernel/qclipboard_x11.cpp
@@ -428,6 +428,20 @@ QClipboard::QClipboard(QObject *parent)
// XFixesSelectionNotify events when someone changes the
// clipboard.
(void)QApplication::desktop();
+
+#ifndef QT_NO_XFIXES
+ if (X11->use_xfixes && X11->ptrXFixesSelectSelectionInput) {
+ const unsigned long eventMask =
+ XFixesSetSelectionOwnerNotifyMask | XFixesSelectionWindowDestroyNotifyMask | XFixesSelectionClientCloseNotifyMask;
+ for (int i = 0; i < X11->screenCount; ++i) {
+ X11->ptrXFixesSelectSelectionInput(X11->display, QX11Info::appRootWindow(i),
+ XA_PRIMARY, eventMask);
+ X11->ptrXFixesSelectSelectionInput(X11->display, QX11Info::appRootWindow(i),
+ ATOM(CLIPBOARD), eventMask);
+ }
+ }
+#endif // QT_NO_XFIXES
+
if (X11->time == CurrentTime) {
// send a dummy event to myself to get the timestamp from X11.
qt_init_timestamp_data data;