summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-06-17 16:09:51 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-06-18 09:48:52 (GMT)
commit1448e36be786648a7764255c24edddc636315427 (patch)
treeb4d59e0200ef51b0cccb1314f01007948ada631d /src/gui
parentb7468f5df0d3f98d56282283127c4b1a28749f7b (diff)
downloadQt-1448e36be786648a7764255c24edddc636315427.zip
Qt-1448e36be786648a7764255c24edddc636315427.tar.gz
Qt-1448e36be786648a7764255c24edddc636315427.tar.bz2
Fix for emitting changed signal in QClipboard
When the app that owns the selection quits and there is no clipboard manager running we emit the changed signal whenever the timestamp of the event we got is greater than our timestamp. Task-number: QTBUG-8157 Reviewed-by: Thiago Macieira Author: Luboš Luňák
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qclipboard_x11.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qclipboard_x11.cpp b/src/gui/kernel/qclipboard_x11.cpp
index 3bdc971..9fcc718 100644
--- a/src/gui/kernel/qclipboard_x11.cpp
+++ b/src/gui/kernel/qclipboard_x11.cpp
@@ -1518,7 +1518,7 @@ bool qt_xfixes_selection_changed(Window selectionOwner, Time timestamp)
(unsigned int)(d ? d->timestamp : 0), (unsigned int)timestamp);
#endif
if (!owner || (selectionOwner && selectionOwner != owner->internalWinId()) ||
- (!selectionOwner && d->timestamp != CurrentTime && d->timestamp < timestamp))
+ (!selectionOwner && (d->timestamp == CurrentTime || d->timestamp < timestamp)))
return qt_check_selection_sentinel();
return false;
}
@@ -1532,7 +1532,7 @@ bool qt_xfixes_clipboard_changed(Window clipboardOwner, Time timestamp)
(unsigned int)(d ? d->timestamp : 0), (unsigned int)timestamp);
#endif
if (!owner || (clipboardOwner && clipboardOwner != owner->internalWinId()) ||
- (!clipboardOwner && d->timestamp != CurrentTime && d->timestamp < timestamp))
+ (!clipboardOwner && (d->timestamp == CurrentTime || d->timestamp < timestamp)))
return qt_check_clipboard_sentinel();
return false;
}