title: Can't embed OpenGL window into QWidget with XReparentWindow
body: <p>I'm trying to add better UI for an OpenGL-based program with Qt. Since I can modify that program it's not hard to get the window ID. So I think embedding it into a QWidget would be a good idea. However, it doesn't work like I expected:</p>
  
  <p>After <code>XReparentWindow</code> is called, the OpenGL window lose its decoration, but the position didn't change.</p>
  
  <p>If I use <code>XConfigureWindow</code> to move it to position <code>(0, 0)</code> relative to parent it goes to the top-left corner of the screen, but not the QWidget.</p>
  
  <p>After reparenting, a third window can cover the QWidget, but nothing can cover the OpenGL window.</p>
  
  <p>X11 reported no errors during the whole operation.</p>
  
  <p>It seems the parent of the OpenGL window has been set to the root window instead of my QWidget. What should I do to make it work correctly?</p>