Bug 494071 - Clicking on system tray icon does not open main window, "Restore" missing from context menu
Summary: Clicking on system tray icon does not open main window, "Restore" missing fro...
Status: CONFIRMED
Alias: None
Product: akregator
Classification: Applications
Component: general (other bugs)
Version First Reported In: 6.2.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-03 22:42 UTC by Aleksey Kontsevich
Modified: 2025-07-29 08:23 UTC (History)
2 users (show)

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 Aleksey Kontsevich 2024-10-03 22:42:26 UTC
SUMMARY
2 issues found:
1) If Akregator tray icon set to "Automatic" in Plasma Panel settings then pressing to the icon has no effect: no window popup or hide. If it is always visible - works normal: 1 click - window pops up, 2nd time - hides.
2) No unread feeds number on the tray icon.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20241002
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Kernel Version: 6.11.0-1-default (64-bit)
Graphics Platform: X11
Comment 1 Aleksey Kontsevich 2024-10-03 22:47:52 UTC
Also Restore/Minimize tray icon menu items were absent. Now they are shown. Now set tray icon visibility back to "Automatic" - works normal again: 1 click - window pops up, 2nd time - hides. Weird!
Comment 2 Aleksey Kontsevich 2024-10-04 12:38:13 UTC
(In reply to Aleksey Kontsevich from comment #0)
> 1) If Akregator tray icon set to "Automatic" in Plasma Panel settings then
> pressing to the icon has no effect: no window popup or hide. 
> Also Restore/Minimize tray icon menu items were absent.

This always happens after login and session restore. So I assumes it restores incorrectly some how. If I restart Akregator or change tray icon visibility "Always visible"<->"Automatic" Restore/Minimize menu item appears and mouse clicks on the icon work again.

May be related to BUG 487912. May be not.
Comment 3 Brendon Higgins 2025-03-05 16:30:28 UTC
I'm also finding that behaviour, especially where if Akregator is minimized to the tray icon at logout, when the session is restored at login Akregator will be in the tray but will not restore the main window from clicking the icon. I can even open the settings using the icon's RMB context menu, but that doesn't help. I have to quit Akregator and restart it each time - an easy if annoying workaround, and defeats the purpose of session restoration functionality.

My guess would be that perhaps Akregator has some internal state to keep track of whether its window is minimized to the tray icon or not, and that state is not correctly initialized when the session is restored with the window starting in the minimized condition.

Info copied from About/Components page:
Akregator: 6.3.2 (24.12.2)
KDE Frameworks: 6.11.0
Qt: Using 6.7.2 and built against 6.7.2
Debian GNU/Linux trixie/sid (Xcb)
Build ABI: x86_64-little_endian-lp64
Kernel: linux 6.12.12-amd64
Comment 4 Jonathan Marten 2025-03-06 09:43:15 UTC
The number of unread articles not being shown on the tray icon is intentional, see bug 377485.

The system tray icon not opening the main window when clicked, and the context menu missing the "Restore" item, can be confirmed with current master and starting Akregator from the command line - no new login or session restore is needed.

Operating System: Gentoo 2.17
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.1
Kernel Version: 6.6.47-gentoo-x86_64 (64-bit)
Graphics Platform: X11
Processors: 3 × AMD Phenom(tm) II X3 705e Processor
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GT 730
Comment 5 Bug Janitor Service 2025-03-06 14:33:53 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/akregator/-/merge_requests/63
Comment 6 Jonathan Marten 2025-03-10 08:10:39 UTC
Git commit 37472c0e2ffbf539b697888ed1131571a6a231e3 by Jonathan Marten.
Committed on 10/03/2025 at 08:10.
Pushed by marten into branch 'master'.

Re-register the MainWindow with the system tray icon if its window handle changes

This is initially set as the KStatusNotifierItem's associated window,
but further on during startup the window gets destroyed and recreated.
This happens during the initialisation of the article viewer, somewhere
deep within QWebEngine. Since the KStatusNotifierItem retains the
associated window using its window handle, that association is lost.
The symptom is that the tray icon menu does not have a "Restore" item
and clicking on the icon does not open the main window.

The event filter monitors the MainWindow's window handle and, if it changes
(either during startup or while running) for any reason, re-registers it as
the tray icon's associated window.

M  +27   -3    src/main.cpp

https://invent.kde.org/pim/akregator/-/commit/37472c0e2ffbf539b697888ed1131571a6a231e3
Comment 7 Jonathan Marten 2025-03-10 08:19:20 UTC
Git commit 4d04eedb66483725974f807b1d39aed91523b674 by Jonathan Marten.
Committed on 10/03/2025 at 08:11.
Pushed by marten into branch 'release/25.04'.

Re-register the MainWindow with the system tray icon if its window handle changes

This is initially set as the KStatusNotifierItem's associated window,
but further on during startup the window gets destroyed and recreated.
This happens during the initialisation of the article viewer, somewhere
deep within QWebEngine. Since the KStatusNotifierItem retains the
associated window using its window handle, that association is lost.
The symptom is that the tray icon menu does not have a "Restore" item
and clicking on the icon does not open the main window.

The event filter monitors the MainWindow's window handle and, if it changes
(either during startup or while running) for any reason, re-registers it as
the tray icon's associated window.

(cherry picked from commit 37472c0e2ffbf539b697888ed1131571a6a231e3)

M  +27   -3    src/main.cpp

https://invent.kde.org/pim/akregator/-/commit/4d04eedb66483725974f807b1d39aed91523b674
Comment 8 Aleksey Kontsevich 2025-04-20 14:14:08 UTC
Where that was fixed?! Today updated to Akregator version 6.4.0 (25.04.0) - issue still there.

Operating System: openSUSE Tumbleweed 20250418
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13.0
Qt Version: 6.9.0
Kernel Version: 6.14.2-1-default (64-bit)
Graphics Platform: X11
Comment 9 Aleksey Kontsevich 2025-07-29 08:23:43 UTC
When this issue will be fixed?! Happens every day!!!