Skip to content
  • David Edmundson's avatar
    [wayland] Syncronise pending geometry with acked configure requests · 65b8ba17
    David Edmundson authored
    Summary:
    When we want to change a client's size and position together we have to
    request the client becomes a new size and only then move the window to
    the new location.
    
    Currently we process the new position the next time the buffer updates,
    but with no guarantee that it has actually tried to resize/whatever yet.
    The client could be providing a new buffer just because the contents
    have changed.
    
    XDGShell has an acked serial designed to keep everything precisely in
    sync. A surface represents the last configure that was acked.
    
    This patch tracks the pending position for each configure and applies it
    accordingly.
    
    WL_shell does not have this mechanism, so behaviour is kept the same as
    before.
    
    ----
    
    This is a pre-requisite to syncing maximisedState/isFullScreen with the
    configure request.
    
    Potentially we could remove the isWaitingForResizeSync checks when
    resizing and it will still resize smoothly.
    
    Test Plan:
    Relevant unit test still passes with the client responding
    Resized a window from the left edge with WLShell and XDGShellV6
    
    Reviewers: #kwin, romangg
    
    Reviewed By: #kwin, romangg
    
    Subscribers: romangg, kwin
    
    Tags: #kwin
    
    Differential Revision: https://phabricator.kde.org/D15135
    65b8ba17