From 6a7ee92b3958e3a3ebc16be15f8bd34217ec7bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 10 Dec 2014 07:27:23 +0100 Subject: Handle SelectionClientClose in QXcbClipboard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QXcbClipboard listens for subtype SelectionClientClose of Xfixes SelectionNotify event, but doesn't handle it. When the client holding the clipboard selection closes the Clipboard becomes empty and thus the change should be emitted. This fixes downstream KDE Bug #329174. Change-Id: I19fb8cfd7bd3b249c0bc6ca2a724a9aeeb05ac7e Reviewed-by: Jørgen Lind Reviewed-by: Aleix Pol Gonzalez --- src/plugins/platforms/xcb/qxcbclipboard.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/xcb') diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp index 8b3893ec2f..f56a29d985 100644 --- a/src/plugins/platforms/xcb/qxcbclipboard.cpp +++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp @@ -742,7 +742,8 @@ void QXcbClipboard::handleXFixesSelectionRequest(xcb_xfixes_selection_notify_eve m_xClipboard[mode]->reset(); } emitChanged(mode); - } + } else if (event->subtype == XCB_XFIXES_SELECTION_EVENT_SELECTION_CLIENT_CLOSE) + emitChanged(mode); } -- cgit v1.2.3 From 2e2de5e4820a928e017d3b92e826e23d95805fca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Thu, 4 Dec 2014 13:30:40 +0100 Subject: Fix xcb backend not grabbing the server as default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The xcb backend relies on grabbing the x server in a few situations like popuphandling. For Qt 5.4.0 the logic enabling this code path was moved into the plugin. However it defaults to never grabbing the server Change-Id: I82489a0727affbce62587b3d7470085cf716a0cc Task-number: QTBUG-43049 Reviewed-by: Martin Gräßlin Reviewed-by: Laszlo Agocs --- src/plugins/platforms/xcb/qxcbintegration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/xcb') diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index 3818494d99..f0c4a7f691 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -165,7 +165,7 @@ QXcbIntegration::QXcbIntegration(const QStringList ¶meters, int &argc, char "\t Use the -dograb option to enforce grabbing."); } #endif - m_canGrab = (!underDebugger && noGrabArg) || (underDebugger && doGrabArg); + m_canGrab = (!underDebugger && !noGrabArg) || (underDebugger && doGrabArg); static bool canNotGrabEnv = qEnvironmentVariableIsSet("QT_XCB_NO_GRAB_SERVER"); if (canNotGrabEnv) -- cgit v1.2.3