add a version containmentForScreen with activity
ClosedPublic

Authored by mart on Mar 15 2018, 6:31 PM.

Details

Summary

add a version of containmentForScreen which it has the activity.
which is correct as the activity id of containments in in libplasma side.
this ensure the correctness of shellCorona createContainmentForActivity
as now it works also for activities different from the current one.
to make multimonitor a tad safer with it, when creating containments for an activity, initialize their lastScreen to the asked screen.

Test Plan

tried with an old plasmashell and is perfectly retrocompatible

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mart created this revision.Mar 15 2018, 6:31 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMar 15 2018, 6:31 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
mart requested review of this revision.Mar 15 2018, 6:31 PM
mart edited the summary of this revision. (Show Details)
davidedmundson requested changes to this revision.EditedMar 30 2018, 3:13 AM
davidedmundson added a subscriber: davidedmundson.

Either Corona tracks which containment are on which containment or ShellCorona does.

Having

QHash<QString /*activity*/, QSet<Plasma::Containment *> > m_desktopContainments;

in ShellCorona

and containmentForScreen(int id, const QString &activity) in Corona

The subclass is storing the data the superclass is allegedly providing.

We're storing the same thing in two places (either a map in shellcorona, or stored in the containment). This is asking for trouble.

I'd be happy for activity management to be moved here, it would save ShellCorona trying to retrospectively add a layer in a tree at completely the wrong place and clean up a tonne of code.
But if we're doing that it should be done completely.

This revision now requires changes to proceed.Mar 30 2018, 3:13 AM
mart updated this revision to Diff 30914.Mar 30 2018, 11:03 AM
  • Merge branch 'master' into arcpatch-D11361
  • add containmentsForActivity and containmentsForScreen
mart updated this revision to Diff 30915.Mar 30 2018, 11:06 AM
  • only consider desktop containments
mart added a comment.Mar 30 2018, 11:12 AM

so, i tried to remove m_desktopContainments in D11801, using the new query functions i added here.

all seems to keep working, hopefully makes things a bit more robust

mart updated this revision to Diff 31200.Apr 3 2018, 9:29 AM
  • make sure the new containment has the proper activity
davidedmundson accepted this revision.Apr 11 2018, 1:29 PM
This revision is now accepted and ready to land.Apr 11 2018, 1:29 PM

tried with an old plasmashell and is perfectly retrocompatible

Please make sure that includes comprehensively trying adding and removing screens and activities.

This revision was automatically updated to reflect the committed changes.