Bug 483899 - KTorrent - Clicking on the tray icon does not open the window
Summary: KTorrent - Clicking on the tray icon does not open the window
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: 24.02.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-18 13:15 UTC by DmaliOG
Modified: 2024-03-27 11:43 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DmaliOG 2024-03-18 13:15:00 UTC
OBSERVED RESULT
It looks like your application is not deployed from the tray.

EXPECTED RESULT
It should unfold.

SOFTWARE/OS VERSIONS
  Linux/KDE Plasma: EndeavorOS Linux x86_64
  KDE Plasma Version: 6.0.2
  KDE Frameworks Version: 6.0.0
  Qt Version: 6.6.2

  ADDITIONAL INFORMATION
  Wayland
  https://www.veed.io/view/6d0f85f1-ae1c-44eb-8867-d26138e1422b?panel=share
Comment 1 Nili 2024-03-18 17:06:13 UTC
Same issue for me on Tumbleweed. At least the option right-click > Stop All / Exit it works. 
I stop the torrents and then close/reopen app to make it working.

Also i don't minimize to tray, i make it minimize to taskbar due to this matter. It wasn't a issue on Plasma 5.

Operating System: openSUSE Tumbleweed 20240315
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.9-1-default (64-bit)
Graphics Platform: Wayland
Comment 2 Bug Janitor Service 2024-03-18 19:58:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/ktorrent/-/merge_requests/114
Comment 3 Nicolas Fella 2024-03-18 21:27:57 UTC
Git commit cb058cff726ed33e31583d462480b6d53cfffb0a by Nicolas Fella.
Committed on 18/03/2024 at 19:53.
Pushed by aacid into branch 'master'.

Set associated window for tray icon after showing main window

Currently we set the associated window by passing GUI as parent window to the
KStatusNotifierItem constructor. This will obtain the windowHandle for it and
save that.

Later when creating the WebView for the search plugin Qt deletes and recreates the
windowHandle for the main window, invalidating the windowHandle KStatusNotifierItem
has saved.

This causes showing/hiding via the tray icon to not work.

To avoid this manually set the associated window later when the handle won't change
any more

M  +2    -0    ktorrent/gui.cpp
M  +4    -0    ktorrent/trayicon.cpp
M  +2    -0    ktorrent/trayicon.h

https://invent.kde.org/network/ktorrent/-/commit/cb058cff726ed33e31583d462480b6d53cfffb0a
Comment 4 Nicolas Fella 2024-03-18 22:04:19 UTC
Git commit 2189ace11b528f325352f70f81557f882c34714d by Nicolas Fella.
Committed on 18/03/2024 at 22:03.
Pushed by nicolasfella into branch 'release/24.02'.

Set associated window for tray icon after showing main window

Currently we set the associated window by passing GUI as parent window to the
KStatusNotifierItem constructor. This will obtain the windowHandle for it and
save that.

Later when creating the WebView for the search plugin Qt deletes and recreates the
windowHandle for the main window, invalidating the windowHandle KStatusNotifierItem
has saved.

This causes showing/hiding via the tray icon to not work.

To avoid this manually set the associated window later when the handle won't change
any more
(cherry picked from commit cb058cff726ed33e31583d462480b6d53cfffb0a)

M  +2    -0    ktorrent/gui.cpp
M  +4    -0    ktorrent/trayicon.cpp
M  +2    -0    ktorrent/trayicon.h

https://invent.kde.org/network/ktorrent/-/commit/2189ace11b528f325352f70f81557f882c34714d
Comment 5 DmaliOG 2024-03-21 16:07:54 UTC
Great, thanks for the correction.  Now everything works.
Comment 6 Nili 2024-03-26 22:37:16 UTC
Sorry guys for the bump, but i'm opening this back. 
Firstly glad the OP find it a fix, but i still have issue rising apps from tray once it is closed. 

Perhaps this bug it is partially fixed?

Clicking the KTorrent tray icon works fine for both rise/minimize now. 
But, once i click the [X] button app minimized on tray to be not opened anymore. 

Thankfully right click menu works, so i can use features "stop all" or "exit" to close the application optimally.

Please see the video.
https://streamable.com/4v07lw

Still haning on
Operating System: openSUSE Tumbleweed 20240325
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.8.1-1-default (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-10700 CPU @ 2.90GHz
Memory: 30.9 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630

Configure KTorrent
System Tray Icon [Ticked]
Always minimize to system tray on startup [Unticked]
Show system tray popup messages [Ticked]
Comment 7 Nicolas Fella 2024-03-27 11:43:39 UTC
Please open a new report for this