Bug 403658

Summary: Latte freezes when switching the type of application menu
Product: [Unmaintained] lattedock Reporter: Viorel-Cătălin Răpițeanu <rapiteanu.catalin>
Component: libraryAssignee: Michail Vourlakos <mvourlakos>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: git (master)   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Viorel-Cătălin Răpițeanu 2019-01-27 16:14:14 UTC
SUMMARY
Latte freezes when you're switching the type of menu from a Latte panel.

STEPS TO REPRODUCE
1. Create a Latte panel
2. Add an application menu launcher to the panel
3. Enter into the 'Dock/Panel Settings'
4. Right click the application menu launcher and select 'Alternatives'
5. Select a different type of application menu

OBSERVED RESULT
Latte freezes. When you restart the dock, the application menu launcher either dissapears or it's placed in a different position.

EXPECTED RESULT
The menu should be switch without any issues. 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.14.90
KDE Plasma Version: 5.14.90
KDE Frameworks Version: 5.54.0
Qt Version: 5.12.0-3
Comment 1 Michail Vourlakos 2019-01-27 17:42:40 UTC
(In reply to Viorel-Cătălin Răpițeanu from comment #0)
> 

strange, I tried to reproduce this and it works at all cases
Comment 2 Viorel-Cătălin Răpițeanu 2019-01-27 17:54:37 UTC
(In reply to Michail Vourlakos from comment #1)
> (In reply to Viorel-Cătălin Răpițeanu from comment #0)
> > 
> 
> strange, I tried to reproduce this and it works at all cases

I observed that when you switch the menu on an ordinary Plasma panel, the launcher flashes (the implementation might remove/add the new selected launcher in the same position). I wondered what the Latte dock would do since it locks itself right after you select an option. Wait for the launcer to be replaced (if that's the implementation), then lock itself up? 
I admit however, I wasn't expecting a freeze for this case.

P.S.: I don't know how the switching is really made. (haven't looked at the code yet).
Comment 3 Michail Vourlakos 2019-01-27 18:00:31 UTC
(In reply to Viorel-Cătălin Răpițeanu from comment #2)
> (In reply to Michail Vourlakos from comment #1)
> > (In reply to Viorel-Cătălin Răpițeanu from comment #0)
> > > 
> > 
> > strange, I tried to reproduce this and it works at all cases
> 
> I observed that when you switch the menu on an ordinary Plasma panel, the
> launcher flashes (the implementation might remove/add the new selected
> launcher in the same position). 

yes I think is how it is done

> I wondered what the Latte dock would do
> since it locks itself right after you select an option. Wait for the launcer
> to be replaced (if that's the implementation), then lock itself up? 

Latte does not lock itself, I dont know what you are describing

> I admit however, I wasn't expecting a freeze for this case.
> 

you probably did not understand me. In my system Latte Alternative option works fine at all cases. I can not reproduce this in my system. Please try with different layouts and options to check if this is happening always in your system.
Comment 4 Viorel-Cătălin Răpițeanu 2019-01-28 21:42:08 UTC
(In reply to Michail Vourlakos from comment #3)
> > I wondered what the Latte dock would do
> > since it locks itself right after you select an option. Wait for the launcer
> > to be replaced (if that's the implementation), then lock itself up? 
> 
> Latte does not lock itself, I dont know what you are describing

Really bad wording from my part. Sorry about that. What I meant is the behaviour when the panel exits 'The Dock/Panel Settings' phase.
After you select 'Alternatives', the panel will exit the configuration mode even if this pop-up is still up.
 
> > I admit however, I wasn't expecting a freeze for this case.
> > 
> 
> you probably did not understand me. In my system Latte Alternative option
> works fine at all cases. I can not reproduce this in my system. Please try
> with different layouts and options to check if this is happening always in
> your system.

I've attached a video for this issue, testing with a default plasma panel and with Latte. Also, I think I've tried almost all possible configurations and this issue still reproduces.

https://drive.google.com/open?id=1uj-k8twB1nUJ5KsOjIfK02yL4wpi-BVT
Comment 5 Michail Vourlakos 2019-01-29 13:46:01 UTC
At Dock Settings window at its top right corner there is a pin button in order to not close when focus out. If you activate that pin button and try afterwards the Alternatives is Latte still freezing!
Comment 6 Michail Vourlakos 2019-01-29 13:46:38 UTC
is Latte still freezing in that case?
Comment 7 Viorel-Cătălin Răpițeanu 2019-01-29 19:56:58 UTC
(In reply to Michail Vourlakos from comment #6)
> is Latte still freezing in that case?

Latte doesn't freeze when the panel is pinned.
Comment 8 Michail Vourlakos 2019-02-02 23:34:08 UTC
Git commit 668c2ff1394c9c26d4a0c0c70c9664a2b3f2f28b by Michail Vourlakos.
Committed on 02/02/2019 at 23:31.
Pushed by mvourlakos into branch 'master'.

dont close view settings when Alternatives shown

--this way the user can also choose different Alternatives
without having false applets replacements or Latte failing

M  +4    -2    app/view/settings/primaryconfigview.cpp
M  +4    -2    app/view/settings/secondaryconfigview.cpp

https://commits.kde.org/latte-dock/668c2ff1394c9c26d4a0c0c70c9664a2b3f2f28b
Comment 9 Michail Vourlakos 2019-02-02 23:34:53 UTC
(In reply to Viorel-Cătălin Răpițeanu from comment #7)
> 

please free to recheck, it should be fixed now. The new commit does not close the Settings windows when Alternatives window is shown.
Comment 10 Viorel-Cătălin Răpițeanu 2019-02-03 23:40:58 UTC
(In reply to Michail Vourlakos from comment #9)
> (In reply to Viorel-Cătălin Răpițeanu from comment #7)
> > 
> 
> please free to recheck, it should be fixed now. The new commit does not
> close the Settings windows when Alternatives window is shown.

Right now, everything is working as expected.