From abc3c633f3829686a042bb93cda0a2cc61de51cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 21 Aug 2015 11:10:31 +0200 Subject: [PATCH] Fix regression in unit-test introduced with 62b640117525b72133d38454c66ed6b5205e064b I don't understand why, but this fixes the TestXcbWrapper::testTransientFor(). Failing code fragment in question: Window transientWindow(createWindow()); transientWindow.changeProperty(XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 32, 1, &m_testWindow); // let's get another transient object TransientFor realTransient(transientWindow); QVERIFY(realTransient.getTransientFor(&compareWindow)); QCOMPARE(compareWindow, (xcb_window_t)m_testWindow); the QCOMPARE failed with one compareWindow being 0. It looks like the cast from Xcb::Window to xcb_window_t in the changeProperty failed. REVIEW: 124864 --- xcbutils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcbutils.h b/xcbutils.h index 9f9f35d165..f21596aa16 100644 --- a/xcbutils.h +++ b/xcbutils.h @@ -1420,11 +1420,11 @@ public: void kill(); operator xcb_window_t() const; private: - QRect m_logicGeometry; xcb_window_t doCreate(const QRect &geometry, uint16_t windowClass, uint32_t mask = 0, const uint32_t *values = NULL, xcb_window_t parent = rootWindow()); void destroy(); xcb_window_t m_window; bool m_destroy; + QRect m_logicGeometry; }; inline