Skip to content
  • Jonas Ådahl's avatar
    client: Fully flush during blocking dispatch · 242617c3
    Jonas Ådahl authored
    
    
    wl_display_flush() may fail with EAGAIN which means that not all data
    waiting in the buffer has been flushed. We later block until there is
    data to read, which could mean that we block on input from the
    compositor without having sent out all data from the client. Avoid this
    by fully flushing the socket before starting to wait.
    
    This commit also changes the array length of the struct pollfd array
    from 2 to 1, as only one element was ever used.
    
    Signed-off-by: default avatarJonas Ådahl <jadahl@gmail.com>
    Reviewed-by: default avatarDaniel Stone <daniels@collabora.com>
    242617c3