Skip to content
  • David Edmundson's avatar
    [wayland] Asyncronously update maximise flags · e327cce4
    David Edmundson authored
    Summary:
    A window maximising is an async operation. We work out what size we want
    the client to be, then request the client to update. The window isn't
    really maximised until we get that new buffer with the new size.
    
    This patch splits the requested, pending and current state, updating as
    appropriate.
    
    Things are a bit complex with things like borders. Technically we
    shouldn't update them till we get a response, but we also need to have
    the correct geometry of the full size window in our request. For now
    they behave as before, updating when we request the change.
    
    X code is untouched.
    
    This hopefully fixes maximise animations on wayland as now we update the
    geometry before emitting maximisedChanged.
    
    Test Plan:
    Maximised a window with the button and double clicking title bar.
    
    I get only the following events on maximise/restore:
    19:51:39.156 KWin::EffectsHandlerImpl::slotGeometryShapeChanged geometry
    shape changed QRect(47,24 640x509) QRect(0,0 716x573)
    19:51:39.157 KWin::EffectsHandlerImpl::slotClientMaximized slot client
    maximised true true
    
    19:51:40.522 KWin::EffectsHandlerImpl::slotGeometryShapeChanged geometry
    shape changed QRect(0,0 716x573) QRect(47,24 640x509)
    19:51:40.522 KWin::EffectsHandlerImpl::slotClientMaximized slot client
    maximised false false
    
    BUG: 382698
    
    Reviewers: #kwin, romangg
    
    Reviewed By: #kwin, romangg
    
    Subscribers: romangg, zzag, kwin
    
    Tags: #kwin
    
    Differential Revision: https://phabricator.kde.org/D15150
    e327cce4