From e215aba4aa604e534b0ab9c50400da5d4d4e49ae Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Tue, 8 Apr 2014 22:26:24 +0200 Subject: XCB: Only use the XFixes extension if available Commit 0d4918950e61f added a new place (QXcbWindow::setTransparentForMouseEvents()) where requests from the XFixes extension are generated. However, this wasn't checking if the extension is actually supported before using it. Fix this by turning QXcbWindow::setTransparentForMouseEvents() into a no-op if the XFixes extension isn't available. This means that the window in question won't be transparent for mouse events, but we cannot do much about that if the X server doesn't support the required extension. Task-number: QTBUG-38109 Change-Id: I2931481eb71bab990f2dcf0ec600b9e62d3d799c Reviewed-by: Shawn Rutledge --- src/plugins/platforms/xcb/qxcbwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index bed6eb59dc..5a2002f1d4 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -1174,7 +1174,7 @@ void QXcbWindow::updateNetWmUserTime(xcb_timestamp_t timestamp) void QXcbWindow::setTransparentForMouseEvents(bool transparent) { - if (transparent == m_transparent) + if (!connection()->hasXFixes() || transparent == m_transparent) return; xcb_rectangle_t rectangle; -- cgit v1.2.3