D15150: [wayland] Asyncronously update maximise flags

David Edmundson <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
davidedmundson created this revision.
davidedmundson added a reviewer: KWin.
Herald added a project: KWin.
Herald added a subscriber: kwin.
davidedmundson requested review of this revision.

REVISION 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
  
  Though to me it looks to flicker slightly on the first frame?
  @vzzag can you take a look

REPOSITORY
  R108 KWin

BRANCH
  async_maximise

REVISION DETAIL
  https://phabricator.kde.org/D15150

AFFECTED FILES
  autotests/integration/shell_client_test.cpp
  shell_client.cpp
  shell_client.h

To: davidedmundson, #kwin
Cc: kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.