Bug 408505 - What is the purpose of the "Multiple Layouts Warning" dialog ?
Summary: What is the purpose of the "Multiple Layouts Warning" dialog ?
Status: RESOLVED INTENTIONAL
Alias: None
Product: lattedock
Classification: Plasma
Component: application (show other bugs)
Version: git (master)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Michail Vourlakos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-10 02:23 UTC by trmdi
Modified: 2019-07-11 10:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description trmdi 2019-06-10 02:23:01 UTC
Everytime I restart my computer I see this dialog: https://i.imgur.com/OtkUhxP.png

From the user point of view, I don't understand what it is used for?
Can you remove that dialog? Because users have nothing to do with it except clicking on the OK button.
Comment 1 Michail Vourlakos 2019-06-10 04:25:25 UTC
Its purpose is to warn users that during exit Latte probably crashed and that should Not happen because it may result to DATA Loss. So the user must take steps to find out why Latte did not close properly. Most often an applet is responsible for this AND it occurs also when Latte runs through terminal during the session exit
Comment 2 Michail Vourlakos 2019-07-11 10:11:58 UTC
a full explanation why I think this dialog is important:

Some info concerning this...

The Multiple layouts mode is a special mode that combines multiple layouts together in order to assign them in different Activities and in the upcoming v0.9 in order to enhance that and give the user the freedom to have shared panels/docks for different Layouts... That will be called "Shared" Layouts... All this will be presented in the audience the upcoming months when the GUI way to support that is available, currently the user has to edit the layouts file by himself.

Concerning the mentioned message and its relation to Multiple mode. Plasma can not distinguish different layouts runtime BUT it supports under X11 having windows at different Activities. In order for Latte to achieve this, it tricks Plasma infrastructure and the combination of multiple layouts is presented to it as a single casual layout.

All this is happening through ~/.config/latte/.multiple-layouts_hidden.layout.latte file.
For example lets say that Latte wants to present three different layouts [A], [B] and [C].

When Latte starts the multiple layouts hidden file is empty. The Layout A first is loaded into multiple layouts file. The Layout B before is added into the multiple layouts file must first update itself concerning applet ids, containment ids etc... in order to not confllict with [A] and create crashes. After Layout B has updated its settings to not conflict with A it is added into the multiple layouts file. When Layout C must be loaded also it must do exactly what B did in order to not conflict neither with A or B. In the end of the process, A,B,C have been loaded in multiple layouts file and live in there as long as Latte runs.
When Latte will close itself properly all three layouts will return their settings in to their corresponding original layout files and the .multiple-layouts file should be empty from any layout settings.

If things go wrong for example Latte crashed or did not close properly in the end then the next time it will start the first thing to check is the multiple layouts hidden file. If in there there are layout settings even though it shouldnt the mentioned message appears BUT of course Latte is trying to protect you by completing properly the process to empty the .multiple layouts hidden file and return the layout settings to their original files.