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

Eike Hein noreply at phabricator.kde.org
Wed Aug 1 19:58:43 BST 2018


hein created this revision.
hein added a reviewer: mart.
Restricted Application added a project: KWin.
hein requested review of this revision.

REVISION SUMMARY
  This is a basic proof of concept KCM using Marco's DBus API from
  D13887 <https://phabricator.kde.org/D13887>, as he requested as a form of review.
  
  The KCM currently installs alongside the old one with no
  file conflicts.
  
  The UI is based on ScrollViewKCM. I'll attach a screenshot
  seperately. It's OK-ish, I guess, although only the "Rows"
  spinbox correctly manages the "Apply" button; adding, removing
  and renaming desktops results in direct calls to the compositor.
  Renaming is done with an inline text field on the row delegate.
  
  More importantly, here's the problems I found:
  
  - The `desktopCreated` signal doesn't have an index parameter, which means I had to resort to appending new desktops I'm told about through the protocol, even though `createDesktop` takes a `position` parameter. The struct has an x11DesktopNumber, but I don't want to use that.
  - The `position` parameter in `createDesktop` seems to be handled incorrectly on the KWin side. I expected it to be zero-indexed, but I have to add one to append a new desktop.
  - To do the custom type demarshalling for the structs and vector of structs I copied the type definitions and the functions for now, but it would be good to put this stuff into a shared header considering it's the same repo.
  - The KCM for some reason catches Return presses and closes when anything in the Qt Quick view has focus. To do the inline editing using a TextField in the delegate, I had to implement `Keys.on(Return|Enter)Pressed` instead of using `onAccepted`.
  - A small spacing conundrum with the RowLayout in the footer I was too lazy to work out for now since this is a WIP UI anyway.

REPOSITORY
  R108 KWin

BRANCH
  mart/plasmavirtualdesktop

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

AFFECTED FILES
  kcmkwin/CMakeLists.txt
  kcmkwin/kwindesktopng/CMakeLists.txt
  kcmkwin/kwindesktopng/Messages.sh
  kcmkwin/kwindesktopng/desktopsmodel.cpp
  kcmkwin/kwindesktopng/desktopsmodel.h
  kcmkwin/kwindesktopng/kcm_kwin_virtualdesktops.desktop
  kcmkwin/kwindesktopng/org.kde.kwin.virtualdesktopmanager.xml
  kcmkwin/kwindesktopng/package/contents/ui/main.qml
  kcmkwin/kwindesktopng/package/metadata.desktop
  kcmkwin/kwindesktopng/virtualdesktops.cpp
  kcmkwin/kwindesktopng/virtualdesktops.h

To: hein, mart
Cc: 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/20180801/b9b29484/attachment.html>


More information about the Plasma-devel mailing list