Add "SkipSwitcher" to API
ClosedPublic

Authored by sharvey on Apr 4 2018, 1:53 PM.

Details

Summary

Adding "SkipSwitcher" to API, as a result of discussion in
BUG 375921

Depends on / related to D11924 and D11926.

Diff Detail

Repository
R127 KWayland
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sharvey created this revision.Apr 4 2018, 1:53 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptApr 4 2018, 1:53 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
sharvey requested review of this revision.Apr 4 2018, 1:53 PM
NOTE: This is a junior job and a work in progress!

Following discussion in BUG 375921, it was decided to add SkipSwitcher to the API. This is my first submission to the KWin/KWayland/KWindowSystem group, and @hein has graciously offered to help me out.

As Martin wrote in the bug report, this should be straightforward, following the implementation of SkipTaskbar. For the most part, it is - the autotest results include

PASS   : TestWindowManagement::testRequestsBoolean(skipSwitcher)

However, autotest #6 (kwayland-testWaylandSurface) is failing with an exception. I got the same exception when testing KWayland without my changes. I'm attaching the test output, in case it helps figure out what's wrong. All the other tests succeed.


KWayland test results / exception report

sharvey edited the summary of this revision. (Show Details)
sharvey added inline comments.Apr 4 2018, 2:20 PM
src/client/plasmawindowmodel.h
110

Correct version number? 5.45?

src/server/plasmashell_interface.h
151

Version 5.45?

graesslin requested changes to this revision.Apr 4 2018, 4:24 PM
graesslin added a subscriber: graesslin.
graesslin added inline comments.
src/client/plasmawindowmodel.h
110

I normally update those just before pushing to the next frameworks release number.

src/client/protocols/plasma-shell.xml
339

The since is wrong. It must be higher than the current version. You also need to increase the version number and I think this should be added as last request and not in between.

src/client/protocols/plasma-window-management.xml
49

Here also the since is wrong

This revision now requires changes to proceed.Apr 4 2018, 4:24 PM
sharvey updated this revision to Diff 31308.Apr 4 2018, 4:37 PM
  • Add @since 5.45 tag to SkipSwitcher doxygen comments
sharvey marked 2 inline comments as done.Apr 4 2018, 4:40 PM
sharvey added inline comments.
src/client/plasmawindowmodel.h
110

Sorry. Was busy uploading before seeing your reply. Will gladly change again if necessary.

src/server/plasmashell_interface.h
151

Will change again if necessary.

sharvey updated this revision to Diff 31311.Apr 4 2018, 4:50 PM
sharvey marked an inline comment as done.
  • Correct & update version numbers in XML entries
sharvey marked 5 inline comments as done.Apr 4 2018, 4:52 PM

Polite "bump" for my reviewers. Please see D12363 - the Kubuntu team has had to manually disable some autotests stemming from D11924.

sharvey added a subscriber: Plasma.Apr 19 2018, 9:44 PM
sharvey retitled this revision from [WIP] Add "SkipSwitcher" to API to Add "SkipSwitcher" to API.Apr 22 2018, 9:49 PM
sharvey added a subscriber: davidedmundson.

Removed [WIP] from title at suggestion of @davidedmundson .

There is one more file which need changes. In src/client/registry.cpp you need to increase the version numbers of the two changed protocols. Adding a new request can be really cumbersome.

src/server/plasmashell_interface.cpp
53

you need to increase the version number.

168

This is at the wrong position. It needs to be the last entry in the list. That might be your compile problem you mentioned in the KWin request.

src/server/plasmawindowmanagement_interface.cpp
122

you need to increase the version number.

sharvey updated this revision to Diff 32906.Apr 23 2018, 7:59 PM
  • Update interface version number; move setSkipSwitcherCallback to end of struct
sharvey marked 3 inline comments as done.Apr 23 2018, 8:00 PM

Changes made. KWayland compiles fine now. Thank you.

The adjustments in registry.cpp are still missing.

src/server/plasmawindowmanagement_interface.cpp
122

this needs to be 9

sharvey updated this revision to Diff 32996.Apr 24 2018, 4:37 PM
  • Update PlasmaWindowManagement interface to version 9
sharvey marked an inline comment as done.Apr 24 2018, 4:40 PM

The adjustments in registry.cpp are still missing.

I apologize, but I don't know what adjustments to make in registry.cpp. In all other cases, I followed the templates for SkipPager or SkipTaskbar. I don't find any reference to those two functions in registry.cpp.

D11924 and D11926 have been pushed, so kwin master branch builds are now broken with:

14:49:26 /home/jenkins/workspace/Plasma kwin kf5-qt5 SUSEQt5.10/abstract_client.cpp: In member function 'void KWin::AbstractClient::setupWindowManagementInterface()':
14:49:26 /home/jenkins/workspace/Plasma kwin kf5-qt5 SUSEQt5.10/abstract_client.cpp:712:8: error: 'class KWayland::Server::PlasmaWindowInterface' has no member named 'setSkipSwitcher'; did you mean 'setSkipTaskbar'?
14:49:26 w->setSkipSwitcher(skipSwitcher());
14:49:26 ^~~~~~~~~~~~~~~
14:49:26 setSkipTaskbar
14:49:26 /home/jenkins/workspace/Plasma kwin kf5-qt5 SUSEQt5.10/abstract_client.cpp: In lambda function:
14:49:26 /home/jenkins/workspace/Plasma kwin kf5-qt5 SUSEQt5.10/abstract_client.cpp:728:16: error: 'class KWayland::Server::PlasmaWindowInterface' has no member named 'setSkipSwitcher'; did you mean 'setSkipTaskbar'?
14:49:26 w->setSkipSwitcher(skipSwitcher());
14:49:26 ^~~~~~~~~~~~~~~
14:49:26 setSkipTaskbar

https://build.kde.org/job/Plasma%20kwin%20kf5-qt5%20SUSEQt5.10/2/console

https://build.neon.kde.org/job/xenial_unstable_kde_kwin/

Observed this on the openSUSE OBS as well. Please fix the compilation issue or revert.

For now I reverted the commit in kwin to allow building. Once this review is merged, it can be re-instated.

For now I reverted the commit in kwin to allow building. Once this review is merged, it can be re-instated.

Thank you for reverting the commit. The one - and only - reason I committed it was because it was flagged as approved and ready to land. I apologize for the chaos. I'll work with my reviewers to straighten the rest of this out.

any update on this? It's just the version increase in registry.cpp which is missing...

Restricted Application edited subscribers, added: kde-frameworks-devel; removed: Frameworks. · View Herald TranscriptMay 20 2018, 1:58 PM
sharvey updated this revision to Diff 34636.May 22 2018, 12:12 PM
  • Increate interface versions for PlasmaShell and PlasmaWindowManagement

any update on this? It's just the version increase in registry.cpp which is missing...

Done. I was unclear as to what needed to change. I got a little outside help from @hein and registry.cpp is update to match the XML file.

Once this is approved, is it safe to land along with D11296?

graesslin accepted this revision.May 22 2018, 2:56 PM

wonderful! Thanks to you two :-) And yes as soon as you push this change you can push the kwin change.

This revision is now accepted and ready to land.May 22 2018, 2:56 PM
This revision was automatically updated to reflect the committed changes.