Bug 484598 - KTorrent - Stuck after clicking [X] button
Summary: KTorrent - Stuck after clicking [X] button
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: 24.02.1
Platform: openSUSE Linux
: NOR minor
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
: 485013 485102 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-03-27 13:21 UTC by Nili
Modified: 2024-04-06 13:05 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nili 2024-03-27 13:21:46 UTC
Clicking the KTorrent tray icon works fine for both rise/minimize on version 24.02.1. But, once i click the [X] button app minimized on tray to be not opened anymore. 

Thankfully the 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

Tested 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
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 1 Jack Hill 2024-04-02 16:04:16 UTC
Git commit 5d216c0b8c9b71c74ae5af755b0a0082f54af83f by Jack Hill.
Committed on 02/04/2024 at 16:01.
Pushed by jackh into branch 'master'.

Undo system tray bug workaround

In KF5 KStatusNotifierIcon would show/hide the main QWindow whilst in KTorrent
we would show/hide the main QWidget. A bug in Qt6 meant that hiding/showing
the QWindow did not neccessarily hide the QWidget.

So if a user closed the window to the tray, the QWidget was considered hidden
but the QWindow was not. Then when clicking on the tray icon, the QWindow
visiblity was being toggled but the QWidget visibility was always hidden.

To work around this we changed KTorrent to hide the QWindow instead of the
QWidget. Now KStatusNotifierIcon has been updated to hide the main QWidget
instead of the QWindow, so we must undo the changes made here.

The upstream bug should fixed in Qt 6.7 anyway.

Reverts e35b4881605f045ebe8bca2da357c2a3ae2f1e02

Reverts efe4aa0dcc23e57e68ecd809068f1a49d7705a07

M  +5    -10   ktorrent/gui.cpp
M  +1    -2    ktorrent/main.cpp

https://invent.kde.org/network/ktorrent/-/commit/5d216c0b8c9b71c74ae5af755b0a0082f54af83f
Comment 2 Jack Hill 2024-04-02 20:13:37 UTC
Git commit d6c4520e82fdc2c14ce0677c1c2a80cc6e52e154 by Jack Hill.
Committed on 02/04/2024 at 20:13.
Pushed by jackh into branch 'release/24.02'.

Undo system tray bug workaround

In KF5 KStatusNotifierIcon would show/hide the main QWindow whilst in KTorrent
we would show/hide the main QWidget. A bug in Qt6 meant that hiding/showing
the QWindow did not neccessarily hide the QWidget.

So if a user closed the window to the tray, the QWidget was considered hidden
but the QWindow was not. Then when clicking on the tray icon, the QWindow
visiblity was being toggled but the QWidget visibility was always hidden.

To work around this we changed KTorrent to hide the QWindow instead of the
QWidget. Now KStatusNotifierIcon has been updated to hide the main QWidget
instead of the QWindow, so we must undo the changes made here.

The upstream bug should fixed in Qt 6.7 anyway.

Reverts e35b4881605f045ebe8bca2da357c2a3ae2f1e02

Reverts efe4aa0dcc23e57e68ecd809068f1a49d7705a07


(cherry picked from commit 5d216c0b8c9b71c74ae5af755b0a0082f54af83f)

M  +5    -10   ktorrent/gui.cpp

https://invent.kde.org/network/ktorrent/-/commit/d6c4520e82fdc2c14ce0677c1c2a80cc6e52e154
Comment 3 Nicolas Fella 2024-04-05 13:26:38 UTC
*** Bug 485013 has been marked as a duplicate of this bug. ***
Comment 4 Nicolas Fella 2024-04-06 13:05:16 UTC
*** Bug 485102 has been marked as a duplicate of this bug. ***