Skip to content
  • Vlad Zahorodnii's avatar
    [scene] Re-build window quads after creating a WindowPixmap · 7569bdf6
    Vlad Zahorodnii authored
    In order to generate window quads for a window, the scene needs a valid
    WindowPixmap tree. If it's time to render the window, the scene will
    build window quads for the contents, the server-side window decoration,
    the drop-shadow and cache the resulting window quads. With this way of
    generating window quads, we need the window pixmap tree to be valid,
    or else no contents window quads will be generated.
    
    While the window pixmap tree is guaranteed to be valid at the time of
    generation of window quads for Wayland and X11 clients, this is not the
    case for Xwayland clients.
    
    When an Xwayland client is created, some time may pass between the
    moment it's been created and the moment when a regular wayland surface
    has been associated with the xwayland window. If the compositor decides
    to render the Xwayland client in that short period of time, the window
    quads cache won't have window quads cache.
    
    In order to work around the weird asynchronous behavior of Xwayland
    clients, this change makes the scene discard the window quad cache when
    a new window pixmap has been created. This will ensure that the current
    window quads are always in sync with the current window pixmap tree.
    7569bdf6