Add rows info to the plasma virtual desktop protocol
ClosedPublic

Authored by mart on Dec 19 2018, 4:01 PM.

Details

Summary

in order for the pager to work correctly and not having to use a weird mix of wayland and dbus apis, the rows
number needs to be in the protocol

Test Plan

new passing autotest

Diff Detail

Repository
R127 KWayland
Branch
phab/virtualdesktoprows
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 7168
Build 7186: arc lint + arc unit
mart created this revision.Dec 19 2018, 4:01 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptDec 19 2018, 4:01 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
mart requested review of this revision.Dec 19 2018, 4:01 PM
hein added a subscriber: hein.Jan 9 2019, 5:41 PM

As per this, progress on this is currently blocking wrapping up Wayland virtual desktops support for 5.15.

I thought we had a whole conversation in the first set of reviews that views (layout) was independent of data.

The desktop cube shows everything flat, desktop grid is configurable (and hardcoded).
The pager is just another view, there's no need to sync with kwin's grid?

src/client/protocols/plasma-virtual-desktop.xml
56

This needs to be in a version 2 and done at the end with appropriate bumps everywhere.

src/server/plasmavirtualdesktop_interface.h
52

Is this even implemented?? I can't find it

If so it's technically safe to remove from the header, but it's a pretty rubbish situation to begin with.

hein added a comment.Jan 11 2019, 12:18 PM

The desktop cube shows everything flat, desktop grid is configurable (and hardcoded).

The desktop grid effect uses the rows setting from the KCM for me.

I don't think it's easy for users to understand that the KCM is configuring KWin only, instead of all of Plasma. Especially because the Pager can't escape KWin's spatial notions anyway: If you use the Pager to switch desktops, by default KWin does a slide animation that's directional based on the rows setting. If the Pager's layout differs from KWin's, the animation played won't fit what's visible on the Pager. Considering the Pager is all about providing a spatial overview into the system, this seems weird.

Plus this protocol is meant to be a private one for use between KWin and plasmashell. I think it's OK for them to integrate tightly, it's not the same as exposing layout information to regular clients. I'd argue the entire PlasmaWindowManagement protocol already does so after all.

zzag added a subscriber: zzag.Jan 11 2019, 12:19 PM
zzag added inline comments.
autotests/client/test_plasma_virtual_desktop.cpp
280

QVERIFY

src/client/plasmavirtualdesktop.h
168

Missing documentation.

mart added inline comments.Jan 14 2019, 9:16 AM
autotests/client/test_plasma_virtual_desktop.cpp
280

why? we want to compare the number of rows, no?

zzag added inline comments.Jan 14 2019, 9:24 AM
autotests/client/test_plasma_virtual_desktop.cpp
280

What if rowsChanged is never emitted? In KWin, we usually do

QVERIFY(spy.wait());
mart updated this revision to Diff 49425.Jan 14 2019, 10:23 AM
  • verify the signal has been emitted
src/client/protocols/plasma-virtual-desktop.xml
56

This isn't done.

zzag added inline comments.Jan 14 2019, 1:43 PM
src/server/plasmavirtualdesktop_interface.h
52

Yeah, given that it was introduced quite recently and it's not implemented, maybe it would be better to delete the method. In either case, if you try to use the method, you'll probably get linker errors.

Also, maybe we don't need PlasmaVirtualDesktopManagementInterface::Private::{rows,columns}.

55 ↗(On Diff #49425)

Wrong version.

mart updated this revision to Diff 49610.Jan 16 2019, 10:43 AM
  • remove dead symbol
zzag added a comment.EditedJan 18 2019, 12:22 PM

David's comment is still not addressed.

mart updated this revision to Diff 49994.Jan 21 2019, 3:03 PM
  • rows belongs to protocol version 2
davidedmundson added inline comments.Jan 21 2019, 4:24 PM
src/client/protocols/plasma-virtual-desktop.xml
56

event needs to be at the end (like how you keep source compatibility in a C++ enum)

src/server/plasmavirtualdesktop_interface.cpp
201 ↗(On Diff #49425)

Technically we should do:

if (wl_resource_get_version(*it) < org_kde_plasma_virtual_desktop_management_send_rows_since_version) {return;}

Though in this specific case as it's only plasma using this API and restart kwin means we'll restart plasma I guess it doesn't really matter.

zzag added inline comments.Jan 21 2019, 5:08 PM
src/server/plasmavirtualdesktop_interface.cpp
94 ↗(On Diff #49425)

This one should be bumped as well.

mart updated this revision to Diff 50046.Jan 22 2019, 9:19 AM
  • bump versions
davidedmundson accepted this revision.Jan 22 2019, 12:43 PM
This revision is now accepted and ready to land.Jan 22 2019, 12:43 PM
This revision was automatically updated to reflect the committed changes.