File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -253,6 +253,9 @@ BitcoinGUI::~BitcoinGUI()
253253 delete m_app_nap_inhibitor;
254254 MacDockIconHandler::cleanup ();
255255#endif
256+ #ifdef BITCOIN_QT_WIN_TASKBAR
257+ delete m_taskbar_progress;
258+ #endif
256259
257260 delete NetWatch;
258261 delete rpcConsole;
@@ -1442,6 +1445,13 @@ void BitcoinGUI::showEvent(QShowEvent *event)
14421445 showMempoolStatsAction->setEnabled (true );
14431446 aboutAction->setEnabled (true );
14441447 optionsAction->setEnabled (true );
1448+
1449+ #ifdef BITCOIN_QT_WIN_TASKBAR
1450+ // If window handle wasn't available during construction, set it now
1451+ if (m_taskbar_progress && !m_taskbar_progress->window () && windowHandle ()) {
1452+ m_taskbar_progress->setWindow (windowHandle ());
1453+ }
1454+ #endif
14451455}
14461456
14471457#ifdef ENABLE_WALLET
Original file line number Diff line number Diff line change 55#ifndef BITCOIN_QT_WINTASKBARPROGRESS_H
66#define BITCOIN_QT_WINTASKBARPROGRESS_H
77
8- #ifdef WIN32
8+ #ifdef Q_OS_WIN
99#include < QWindow>
1010
1111#include < windows.h>
@@ -27,6 +27,9 @@ class WinTaskbarProgress
2727 /* * Set the window handle to attach progress to */
2828 void setWindow (QWindow* window);
2929
30+ /* * Get the window handle */
31+ QWindow* window () const { return m_window; }
32+
3033 /* * Set progress value (0-100) */
3134 void setValue (int value);
3235
@@ -46,6 +49,6 @@ class WinTaskbarProgress
4649 void releaseTaskbar ();
4750};
4851
49- #endif // WIN32
52+ #endif // Q_OS_WIN
5053
5154#endif // BITCOIN_QT_WINTASKBARPROGRESS_H
You can’t perform that action at this time.
0 commit comments