Emit signals when a screen is added or removed
ClosedPublic

Authored by amantia on Oct 31 2017, 11:00 AM.

Details

Summary

This is the implementation of the new Plasma Corona API, as described in https://phabricator.kde.org/D8566

Diff Detail

Repository
R120 Plasma Workspace
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
amantia created this revision.Oct 31 2017, 11:00 AM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 31 2017, 11:00 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
amantia edited the summary of this revision. (Show Details)Oct 31 2017, 11:10 AM
amantia added reviewers: Plasma, ervin, dvratil, mlaurent, hein.
ervin added a comment.Oct 31 2017, 2:10 PM

Looks good to me, but I'm giving time for the Plasma team to see it.

The only intended use is folderview, and there are some comments there about whether that's the right approach.

I don't want to have this pushed before we agree on that.

Other than that, code is fine.

apol added subscribers: mart, apol.Oct 31 2017, 3:33 PM

This is specially interesting and it would be important to make it right.

One of the features we lose in Wayland is that we know where to place each component. because of this number being 0 the primary screen, where the important components go. In Wayland there's not a concept of a primary screen and using multiscreen there is basically gambling. One thing we discussed with @mart at some point is to use the screen name to identify the configuration.

That's another use-case for the API.
That said, I think that it would be just better to slowly deprecate the integer id.

amantia updated this revision to Diff 21683.Nov 1 2017, 9:42 AM
amantia edited the summary of this revision. (Show Details)

Emit the screenRemoved/screenAdded signals. This needs a small rename of an internal method.

mwolff added a subscriber: mwolff.Nov 1 2017, 10:41 AM
mwolff added inline comments.
shell/shellcorona.cpp
1163

shouldn't this be done from within removeDesktop? considering this duplicates the change above?

amantia updated this revision to Diff 21686.Nov 1 2017, 10:51 AM

Emit the screenRemoved from within removeDesktop

amantia marked an inline comment as done.Nov 1 2017, 10:51 AM
mwolff added inline comments.Nov 1 2017, 11:02 AM
shell/shellcorona.cpp
1161

now you can undo this hunk

amantia updated this revision to Diff 21687.Nov 1 2017, 11:43 AM

Remove unneeded changed

amantia retitled this revision from Return the screen id for a screen name. to Emit signals when a screen is added or removed.Nov 1 2017, 11:43 AM
mwolff added a comment.Nov 1 2017, 2:26 PM

lgtm, but the plasma people should chime in now, esp. regarding what @apol said

ervin added a comment.Nov 2 2017, 12:08 PM

Looks good to me too but want to give the plasma team the last say.

davidedmundson accepted this revision.Nov 2 2017, 12:20 PM
This revision is now accepted and ready to land.Nov 2 2017, 12:20 PM