Ugh, I hate all these broken toolkits. Now I remember - Qt was stupid and sets the override redirect bit to zero for all windows until MapRequest time, something that IMO is broken about the X protocol (you shouldn't be able to change the override redirect state as there are no events for that, and it causes race conditions later) and also broken about Qt because it actually uses that bit of the protocol. Can you: 1. Put the wa.whatever assignments within the preceeding if () block, eg: if (!XGetWindowAttributes (privateScreen.dpy, event->xcreatewindow.window, &wa)) { privateScreen.setDefaultWindowAttributes (&wa); wa.x = event->xcreatewindow.x; wa.y = event->xcreatewindow.y; wa.width = event->xcreatewindow.width; wa.height = event->xcreatewindow.height; wa.border_width = event->xcreatewindow.border_width; wa.override_redirect = event->xcreatewindow.override_redirect; } I think the big concern that I had when writing this chunk of code was that destroyed windows on the server side (eg, no XGetWindowAttributes fails) wouldn't get any attributes set, including their override_redirect attribute. For Qt windows, it means that we'll just have to work off an invalid override_redirect attribute when handling incoming restack requests relative to their now-destroyed windows, but it shouldn't be too big a deal as I think we don't restack relative to unmapped windows which haven't yet been managed. For everyone else it means we have information that should be correct in 99% of cases. 2. Move the comment up there 3. Add some tests for that behavior, because this Qt "feature" is easy to forget about - have a look in compiz_xorg_gtest_configure_window.cpp for the general integration test structure - I think a general test for this would look like (in the AutostartCompizXorgSystemTestWithTestHelper fixture): a. Grab Server -> Create Window using XCreateWindow (with XCreateWindowAttributes.override_redirect = 1) -> Destroy Window -> Sync/Ungrab Server/Sync -> call WaitForWindowCreation and additionally verify that the override_redirect bit is "1" i. testhelper.cpp should be modified to return some basic window attributes in the TEST_HELPER_WINDOW_READY message in TestHelperWindow ctor. That would window->overrideRedirect () (converted to either 1 or 0) ii. WaitForWindowCreation could return a vector of long (extracted from event.xclient.data.l) iii. Have a simple helper function IsOverrideRedirect (std::vector &data) to inspect that vector for the appropriate bit. iv. EXPECT_TRUE that function. b. Grab Server -> Create Window using XCreateWindow (with XCreateWindowAttributes.override_redirect = 0) -> Destroy Window -> Sync/Ungrab Server/Sync -> call WaitForWindowCreation and additionally verify that the override_redirect bit is "0" c. Grab Server -> Create Window using XCreateWindow (with XSetWindowAttributes.override_redirect = 0) -> call XChangeWindowAttributes (with XWindowAttributes.override_redirect = 1) -> Sync/Ungrab Server/Sync -> call WaitForWindowCreation and additionally verify that the override_redirect bit is "1" d. Grab Server -> Create Window using XCreateWindow (with XSetWindowAttributes.override_redirect = 1) -> call XChangeWindowAttributes (with XWindowAttributes.override_redirect = 0) -> Sync/Ungrab Server/Sync -> call WaitForWindowCreation and additionally verify that the override_redirect bit is "0"