XCB: Only use the XFixes extension if available

Commit 0d4918950e 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 <shawn.rutledge@digia.com>
This commit is contained in:
Uli Schlachter 2014-04-08 22:26:24 +02:00 committed by The Qt Project
parent e14ef58f3d
commit e215aba4aa

View File

@ -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;