Bug 419145 - Hamburger menu opens in the upper left corner of the screen when Elisa is closed while "Keep running in system tray when main window is closed" feature is enabled
Summary: Hamburger menu opens in the upper left corner of the screen when Elisa is clo...
Status: RESOLVED FIXED
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: 20.03.80
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-23 14:23 UTC by Patrick Silva
Modified: 2020-04-03 01:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 20.04.0 when using Qt 5.15 or later


Attachments
screenshot (2.65 MB, image/png)
2020-03-23 14:23 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-03-23 14:23:08 UTC
Created attachment 126969 [details]
screenshot

Also reproducible on Neon unstable.

STEPS TO REPRODUCE
1. check "Keep running in system tray when main window is closed" in elisa settings
2. minimize all windows
3. right-click on elisa's entry in task manager, choose "Close"

OBSERVED RESULT
elisa goes to systray and its hamburger menu opens in the upper left corner of the screen.
See the attached screenshot.

EXPECTED RESULT
no menu should open when elisa is closed

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.18.3
KDE Frameworks Version: 5.68.0
Qt Version: 5.15.0 beta2
Comment 1 Matthieu Gallien 2020-03-23 14:27:45 UTC
Thanks for the report.

I can reproduce this and I had noticed this bug.

I will work on it.
Comment 2 Matthieu Gallien 2020-03-23 20:30:23 UTC
https://invent.kde.org/kde/elisa/-/merge_requests/110 is a candidate fix for this bug.

I am no longer able to reproduce it with this merge request.
Comment 3 Matthieu Gallien 2020-03-23 21:41:40 UTC
Git commit 59c67f5f45bb125c630188189b89c08211357357 by Matthieu Gallien.
Committed on 23/03/2020 at 20:32.
Pushed by mgallien into branch 'release/20.04'.

fix handling of menu exported by system tray icon

seems that reusing the menu exported for the global menu is a very bad
idea

using a menu as a child of the system tray icon seems to be the
solution
Related: bug 409010

M  +2    -1    src/qml/PlatformIntegration.qml

https://invent.kde.org/kde/elisa/commit/59c67f5f45bb125c630188189b89c08211357357
Comment 4 Matthieu Gallien 2020-03-24 09:37:10 UTC
With the flatpak generated from master branch, the menu appears a short time and then disappear.

I believe I will have to implement everything using KSNI class from KDE Frameworks.
Comment 5 Matthieu Gallien 2020-03-31 21:34:04 UTC
So this is a Qt bug and I cannot reproduce it with the qt5.15 dev branch where as Qt 5.12.5 has the bug.

I will try to identify a workaround for this but will not use KSNI for the stable branch (add a new dependency and lots of code).
Comment 6 Matthieu Gallien 2020-03-31 21:46:18 UTC
https://invent.kde.org/kde/elisa/-/merge_requests/113 with a workaround that should avoid the menu showing when it should not.
Comment 7 Nate Graham 2020-04-02 20:46:32 UTC
Git commit 1e635e63fad214774ad036e8b92f0057dc40014b by Nate Graham, on behalf of Matthieu Gallien.
Committed on 01/04/2020 at 15:44.
Pushed by mgallien into branch 'release/20.04'.

workaround not to have the system tray menu appear when it should not

M  +6    -0    src/qml/PlatformIntegration.qml

https://invent.kde.org/kde/elisa/commit/1e635e63fad214774ad036e8b92f0057dc40014b