diff options
Diffstat (limited to 'dev-qt/qtgui/files/qtgui-4.8.5-qclipboard-delay.patch')
-rw-r--r-- | dev-qt/qtgui/files/qtgui-4.8.5-qclipboard-delay.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/dev-qt/qtgui/files/qtgui-4.8.5-qclipboard-delay.patch b/dev-qt/qtgui/files/qtgui-4.8.5-qclipboard-delay.patch new file mode 100644 index 000000000000..d46f8c541872 --- /dev/null +++ b/dev-qt/qtgui/files/qtgui-4.8.5-qclipboard-delay.patch @@ -0,0 +1,33 @@ +From a83ddc5212736f89a0b94667c495494fe6861d63 Mon Sep 17 00:00:00 2001 +From: Michael Palimaka <kensington@gentoo.org> +Date: Mon, 16 Jun 2014 23:52:24 +1000 +Subject: Fix delay with QClipboard and useEventLoop. + +This manifests when using LibreOffice with KDE integration. When KFileDialog is +open, the clipboard is repeatedly polled causing a visible delay since using +QClipboard in "useEventLoop" mode adds 50ms delay to every single clipboard +fetch. + +Change-Id: Id30cda7b983ae7c949fa270d04f772fa44fc21cd +Task-number: QTBUG-38585 +--- + src/gui/kernel/qclipboard_x11.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/gui/kernel/qclipboard_x11.cpp b/src/gui/kernel/qclipboard_x11.cpp +index 14bf088..5f442b9 100644 +--- a/src/gui/kernel/qclipboard_x11.cpp ++++ b/src/gui/kernel/qclipboard_x11.cpp +@@ -548,7 +548,8 @@ bool QX11Data::clipboardWaitForEvent(Window win, int type, XEvent *event, int ti + return false; + + XSync(X11->display, false); +- usleep(50000); ++ if (!XPending(X11->display)) ++ usleep(5000); + + now.start(); + +-- +2.0.0 + |