• Martin Flöser's avatar
    [wayland] Flush QtWaylands wl_display and KWin's wayland server when processing events · 74ae2f50
    Martin Flöser authored
    QtWayland and mesa might dead lock KWin if we start rendering a QWindow
    before Qt/Mesa got the last frame callback. They perform blocking wayland
    event reading on the main gui thread which makes it impossible for KWin
    to do the compositing and send the callback.
    
    To workaround this problem we fake a frameRendered directly after each
    damage event for a Qt internal window. Unfortunately this is not yet
    completely sufficient, thus we also need to ensure that the wayland
    events are processed before any events are processed which would cause
    a repaint and block. Thus we first flush QtWayland's wl_display and then
    our Server connection. If there were any damage events we can be sure
    that the frameRendered is sent before Qt attempts to render.
    74ae2f50
wayland_server.cpp 8.53 KB