Bug 419034 - applets self-created context menus do not block dock hiding
Summary: applets self-created context menus do not block dock hiding
Status: RESOLVED FIXED
Alias: None
Product: lattedock
Classification: Plasma
Component: application (show other bugs)
Version: 0.9.9
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Michail Vourlakos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-20 00:07 UTC by Jazz
Modified: 2020-06-01 14:50 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jazz 2020-03-20 00:07:23 UTC
SUMMARY
I use latte-dock (as a panel) and I use a Note widget in it. When you try to select a text in Notes widget and right click on it, the whole latte-dock completely disappears. It gets weirder when you left-click the Notes widget right after... the whole user experience of latte-dock gets messed up by that bug on my Manjaro KDE/Plasma.

Any workaround, or solution for that?

STEPS TO REPRODUCE
1. Select any text in a Notes widget
2. Right click on it
3. Left click on Notes icon

OBSERVED RESULT
In step 2 the whole panel minimizes.
In step 3 it displays the widget with the right-click context menu and then suddenly the whole dock minimizes again!


EXPECTED RESULT
The dock should not minimize after I click the widget (in steps 2, or 3).

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro KDE Plasma
KDE Plasma Version: 5.18.3
KDE Frameworks Version: 5.67.0
Qt Version: 5.14.1

ADDITIONAL INFORMATION
Comment 1 Michail Vourlakos 2020-03-20 22:37:10 UTC
In plasma panel the Notes widget works OK?
Comment 2 Jazz 2020-03-21 00:08:20 UTC
The visibility of my latte-dock is set to Dodge all Windows. My plasma panel doesn't have that visibility setting, so I set it on Auto Hide.

When I right-click on a selection within the Notes widget on my plasma panel, the focus on the panel altogether with the widget remains. It doesn't dodge/hide, so the behavior is expected here.


However, I've noticed another issue with the plasma panel and Notes, right after you click at e.g. "Copy" from the context menu, the plasma  panel with the Notes widget will hide and after you click Notes again, it doesn't appear even if you repeat left-clicking it couple of times... if you are really persistent, it eventually/randomly appears again. I think this particular issue may be related or significant for debugging my original issue.
Comment 3 Michail Vourlakos 2020-03-21 00:19:44 UTC
For the right click issue I will try to investigate what happens...
Comment 4 Michail Vourlakos 2020-04-05 15:04:45 UTC
Git commit aa3aba50d94b21d6828eef8f886c28cf5696440e by Michail Vourlakos.
Committed on 05/04/2020 at 11:59.
Pushed by mvourlakos into branch 'master'.

make blockHiding multiple state

--blockHiding now tracks down which event has
requested it and it can work flawlessly with
multiple events

M  +9    -6    app/shortcuts/globalshortcuts.cpp
M  +3    -5    app/view/contextmenu.cpp
M  +69   -28   app/view/view.cpp
M  +8    -1    app/view/view.h
M  +44   -13   app/view/visibilitymanager.cpp
M  +12   -7    app/view/visibilitymanager.h
M  +0    -8    containment/package/contents/ui/DebugWindow.qml
M  +0    -2    containment/package/contents/ui/applet/AppletItem.qml
M  +2    -3    containment/package/contents/ui/editmode/Visual.qml
M  +0    -23   containment/package/contents/ui/main.qml
M  +0    -2    plasmoid/package/contents/ui/ContextMenu.qml
M  +10   -7    plasmoid/package/contents/ui/main.qml

https://commits.kde.org/latte-dock/aa3aba50d94b21d6828eef8f886c28cf5696440e
Comment 5 Jazz 2020-04-25 15:11:37 UTC
Michail, that was a great improvement and the issue seems to be fixed now. However, since the latest version of Latte-dock I face random disappearance of the Notes widget. It happens when I boot the system and click at the Notes widget - it becomes crippled, but sometimes the Notes widget seems normal at the beginning and after some time it becomes like this:

https://i.imgur.com/3RurEY6.png

Not sure how could I help you with the debugging this and is it related to your code from above. Let me know your thoughts.
Comment 6 Michail Vourlakos 2020-04-25 17:17:53 UTC
(In reply to Jazz from comment #5)
> Michail, that was a great improvement and the issue seems to be fixed now.
> However, since the latest version of Latte-dock I face random disappearance
> of the Notes widget. It happens when I boot the system and click at the
> Notes widget - it becomes crippled, but sometimes the Notes widget seems
> normal at the beginning and after some time it becomes like this:
> 
> https://i.imgur.com/3RurEY6.png
> 
> Not sure how could I help you with the debugging this and is it related to
> your code from above. Let me know your thoughts.

for Notes widget you should use only Latte git version... Fixes found there can not be applied to stable branch of v0.9.x
Comment 7 Jazz 2020-05-27 14:14:46 UTC
I just wanted to follow up and make clear that my additional bug report in #5 has nothing to do with lattedock. The issue has been reported and fixed in Notes widget (kdeplasma-addons):

https://bugs.kde.org/show_bug.cgi?id=410612
Comment 8 Jazz 2020-06-01 11:01:35 UTC
Michail, I need to re-report my original issue again, since the Notes widget seems modified lately and it continues to work normally on my plasma panel, but not in my latte-dock panel.

Again, whenever I right-click on any selected text, the dialog box with Copy/Cut/Paste altogether with the Notes widget itself loses focus and disappears from screen. Similar behavior as I originally posted here.
Comment 9 Michail Vourlakos 2020-06-01 11:08:57 UTC
1. Are you using Latte git version?
2. What is your plasma version?
Comment 10 Jazz 2020-06-01 12:02:25 UTC
1. I use Latte (latte-dock) 0.9.11-1 from AUR
2. KDE Plasma Version: 5.18.5
Comment 11 Michail Vourlakos 2020-06-01 14:50:28 UTC
Has been fixed in git version