Skip to content
Snippets Groups Projects
  1. Aug 11, 2022
  2. Aug 08, 2022
  3. Aug 05, 2022
  4. Aug 04, 2022
  5. Aug 03, 2022
  6. Aug 01, 2022
  7. Jul 29, 2022
  8. Jul 26, 2022
  9. Jul 24, 2022
  10. Jul 23, 2022
    • Sebastian Keller's avatar
      qt: unmap indirection X11 window before reparenting it back to root · 97244141
      Sebastian Keller authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
      Reparenting a mapped window to root causes it to become a toplevel
      window and can cause window managers to reparent the window themselves
      to show their decorations.
      
      This could happen in two situations:
      
      1. Theoretically it could happen briefly between WindowReleased and
         WindowClose.
      2. It could trigger a race between VLC and the WM if there is a quick
         sequence of WindowOpen -> WindowReleased -> WindowClose -> WindowOpen
         such as when using single instance mode. If the X-server in this
         situation happens to re-use the XID of the X11 indirection window
         from the first WindowOpen for the second WindowOpen, this could
         result in the following race:
         - VLC creates a new X11 indirection window, reparents and maps it
         - VLC reparents it to root
         - VLC closes the connection, freeing the XID
         - VLC opens a new connection
         - VLC creates a new indirection window with the same XID as before
           and reparents and maps it
         - The X-server sends a MapRequest for the *first* X11 indirection
           window caused by the reparent to root to the WM
         - The WM sees a new toplevel window and reparents it. Because the XID
           used by that reparent request is the same as of the newly created
           indirection window, the new window ends up getting reparented.
         This then would result in the indirection window remaining as
         toplevel window. The exact order might change slightly between the
         different processes, but as long as the reparent request by the WM is
         the last one, the issue will trigger.
      
      Closes #25692
      97244141
  11. Jul 20, 2022
Loading