From 148f56085f2d1da8c204a3f7fddf9577ad04731d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 19 Feb 2022 21:47:16 +0000 Subject: [PATCH] Define NIIF_LARGE_ICON ourselves if it's not defined It should actually always be defined when using any of the currently supported compilers, but define it ourselves just in case it isn't. At least get rid of #ifdef checking for it in the code. See #22138. --- src/msw/taskbar.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/msw/taskbar.cpp b/src/msw/taskbar.cpp index 938330b780..696c5b4bd9 100644 --- a/src/msw/taskbar.cpp +++ b/src/msw/taskbar.cpp @@ -35,6 +35,10 @@ #define NIN_BALLOONUSERCLICK 0x0405 #endif +#ifndef NIIF_LARGE_ICON + #define NIIF_LARGE_ICON 0x0020 +#endif + // initialized on demand static UINT gs_msgTaskbar = 0; static UINT gs_msgRestartTaskbar = 0; @@ -249,7 +253,6 @@ wxTaskBarIcon::ShowBalloon(const wxString& title, wxUnusedVar(icon); // It's only unused if not supported actually. -#ifdef NIIF_LARGE_ICON // User specified icon is only supported since Vista if ( icon.IsOk() && wxPlatformInfo::Get().CheckOSVersion(6, 0) ) { @@ -257,9 +260,7 @@ wxTaskBarIcon::ShowBalloon(const wxString& title, notifyData.hBalloonIcon = GetHiconOf(m_balloonIcon); notifyData.dwInfoFlags |= NIIF_USER | NIIF_LARGE_ICON; } - else -#endif - if ( flags & wxICON_INFORMATION ) + else if ( flags & wxICON_INFORMATION ) notifyData.dwInfoFlags |= NIIF_INFO; else if ( flags & wxICON_WARNING ) notifyData.dwInfoFlags |= NIIF_WARNING;