D14542: WIP: Basic KCM using new virtual desktops DBus interface

Eike Hein noreply at phabricator.kde.org
Tue Oct 9 04:15:33 BST 2018


hein added a comment.


  In D14542#338981 <https://phabricator.kde.org/D14542#338981>, @davidedmundson wrote:
  
  > QML and the rest is all fine.
  >
  > I don't understand why desktopmodel is the way it is.
  >
  > There are 2 DBus patterns one could do here.
  >
  > - we buffer all changes in a model locally, when the user clicks save we apply them on the server and recall initialise.
  > - we do things async-realtime. The model is always in sync with remote changes. When the user clicks create/remove we send a request to the server; the model only updates when it gets the callback.
  >
  >   This seems to be doing both patterns at once.
  
  
  I don't understand this review comment, either. But I can try to explain what DesktopsModel does again in addition to the earlier comments in the hopes it clears things up:
  
  - It initially gets the state from KWin and populates.
  - As long as the user makes no changes, KWin-side changes are directly exposed in the model.
  - If the user makes changes, it stops exposing KWin-side changes live, but it keeps track of the KWin-side change, so it can figure out and apply the delta on Apply.
  - When KWin-side changes happen while the model is user-modified, the user is informed that this has happened and that Apply will overwrite them.
  - After Apply, it syncs live again, until the user makes further changes, etc.
  
  From your comment, your second bullet was what the model used to do in the initial revision, when it was instant-apply. It's now delayed-apply. Your first bullet would work, but is clumsy and what this model does is better. It's not necessary to re-initialize and reset the model, because it's smart enough to figure out and apply the delta to the server, so at the end of that sync it ... well, knows it's in sync.

REPOSITORY
  R108 KWin

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

To: hein, mart, davidedmundson, ltoscano
Cc: zzag, davidedmundson, broulik, plasma-devel, kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20181009/2d0cbed8/attachment.html>


More information about the Plasma-devel mailing list