contrib: Qt: Disable systray notification sounds
authorHugo Beauzée-Luyssen <hugo@beauzee.fr>
Fri, 21 Jul 2017 15:34:48 +0000 (17:34 +0200)
committerHugo Beauzée-Luyssen <hugo@beauzee.fr>
Fri, 21 Jul 2017 15:34:48 +0000 (17:34 +0200)
Fix #18530

contrib/src/qt/rules.mak
contrib/src/qt/systray-no-sound.patch [new file with mode: 0644]

index 9dae604..3a3ff05 100644 (file)
@@ -24,6 +24,7 @@ qt: qt-$(QT_VERSION).tar.xz .sum-qt
        mv qtbase-opensource-src-$(QT_VERSION) qt-$(QT_VERSION)
        $(APPLY) $(SRC)/qt/0001-Windows-QPA-Reimplement-calculation-of-window-frames_56.patch  
        $(APPLY) $(SRC)/qt/0002-Windows-QPA-Use-new-EnableNonClientDpiScaling-for-Wi_56.patch
+       $(APPLY) $(SRC)/qt/systray-no-sound.patch
        $(MOVE)
 
 ifdef HAVE_MACOSX
diff --git a/contrib/src/qt/systray-no-sound.patch b/contrib/src/qt/systray-no-sound.patch
new file mode 100644 (file)
index 0000000..0d80933
--- /dev/null
@@ -0,0 +1,13 @@
+--- qt/src/widgets/util/qsystemtrayicon_win.cpp.old
++++ qt/src/widgets/util/qsystemtrayicon_win.cpp
+@@ -258,6 +258,10 @@ bool QSystemTrayIconSys::showMessage(con
+     }
+     if (QSysInfo::windowsVersion() >= QSysInfo::WV_VISTA)
+         tnd.dwInfoFlags |= NIIF_LARGE_ICON;
++
++    // Never play audio on notifications.
++    tnd.dwInfoFlags |= NIIF_NOSOUND;
++
+     tnd.cbSize = notifyIconSize;
+     tnd.hWnd = m_hwnd;
+     tnd.uTimeout = uSecs;