mart added a comment.
In https://phabricator.kde.org/D3006#55743, @davidedmundson wrote: > I can see how this is a bug that needs fixing for the a screen ID > screenCount but what about the case where the screenID isn't valid anymore? > > i.e > a panel was on screen 2 you shutdown (assuming ID's are also 1 and 2 respectively) > when you boot up you now only have 1 screen > > Before the code would return -1 > This would put it on screen 2 which doesn't exist - will that cause a problem? i think it shouldn't (as, no views should be created anyways unless we do actually have a qscreen for it) but it definitely needs more test. i think this should either require more checking when creating panels (only panels i think, desktops may have problems) or, change the check to see if an association between screen id/name is in screenpool and if there is a qscreen corrisponding it. I probably like more the latter as it would have almost the same logic as before, just "correct" REPOSITORY rPLASMAWORKSPACE Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D3006 EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: mart, #plasma Cc: davidedmundson, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas