From b5e3e4ac4c037096fe5d378b09386f52a9b240c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 23 Aug 2015 11:51:35 +0200 Subject: [PATCH] tests test tests, not code The test put a reference to the XCB::Window as data to the _net_wm_transient property, not the window ID This "works" (you get various garbage transients for the leader in addition) as long as the window id itself is the first item in the structure (because that is what the test resolves to verify what it has done) bug fails when the XCB::Window structure changes and anything is the first item (or, btw., when the compiler feels to re-align the structure and adds some padding...) So let's fix the test by at least passing the proper data reference. is FIXED-IN: 5.4.1 REVIEW: 124888 also see REVIEW: 124864 --- autotests/test_xcb_wrapper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autotests/test_xcb_wrapper.cpp b/autotests/test_xcb_wrapper.cpp index b7ae0845de..1fe1934c23 100644 --- a/autotests/test_xcb_wrapper.cpp +++ b/autotests/test_xcb_wrapper.cpp @@ -298,7 +298,8 @@ void TestXcbWrapper::testTransientFor() // Create a Window with a transient for hint Window transientWindow(createWindow()); - transientWindow.changeProperty(XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 32, 1, &m_testWindow); + xcb_window_t testWindowId = m_testWindow; + transientWindow.changeProperty(XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 32, 1, &testWindowId); // let's get another transient object TransientFor realTransient(transientWindow);