Load screenpool at the same time as we connect to screenchanged signals
ClosedPublic

Authored by davidedmundson on Nov 9 2016, 4:37 PM.

Details

Summary

Otherwise we have a gap during load (waiting querying kactivities))
between screen pool being created and us connecting to the screen
changed signals, which in turn are used to update screen pool.

In particular the primary screen can get out of sync between the current
state and the screen pool.

Test Plan

Based on Christopher Feck's research and initial patch

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson retitled this revision from to Load screenpool at the same time as we connect to screenchanged signals.
davidedmundson updated this object.
davidedmundson edited the test plan for this revision. (Show Details)
davidedmundson added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptNov 9 2016, 4:37 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
cfeck added a subscriber: cfeck.Nov 9 2016, 5:02 PM

I confirm it fixes my issue (bug 366187), both with removed plasma* config files, as well as with my actual config files.

fvogt added a subscriber: fvogt.Nov 9 2016, 5:27 PM

A quick question: This changes what the ScreenPool constructor does, are there any potential users of ScreenPool that now miss a call to ->load(), as it was done implicitly before? Wouldn't it be safer to call load() in the constructor as well?

cfeck added inline comments.Nov 9 2016, 5:27 PM
shell/screenpool.cpp
37

This line does nothing. What was the intention?

mart added a subscriber: mart.Nov 10 2016, 10:09 AM
In D3319#61870, @fvogt wrote:

A quick question: This changes what the ScreenPool constructor does, are there any potential users of ScreenPool that now miss a call to ->load(), as it was done implicitly before? Wouldn't it be safer to call load() in the constructor as well?

shellcorona should be the only user so far, so that shouldn't be an issue
even just constructing screenpool later, should be fine

shell/screenpool.cpp
37

i guess was to reset it, so would be m_primaryConnector.clear() or something?

sort out the unused line

mart accepted this revision.Nov 10 2016, 10:58 AM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Nov 10 2016, 10:58 AM
This revision was automatically updated to reflect the committed changes.