diff --git a/widget/src/windows/nsWindow.cpp b/widget/src/windows/nsWindow.cpp index bdfad281b90f..db2dfc167203 100644 --- a/widget/src/windows/nsWindow.cpp +++ b/widget/src/windows/nsWindow.cpp @@ -158,6 +158,7 @@ #include "Layers.h" #include "nsPrintfCString.h" #include "mozilla/Preferences.h" +#include "nsISound.h" #ifdef MOZ_ENABLE_D3D9_LAYER #include "LayerManagerD3D9.h" @@ -6157,7 +6158,10 @@ void nsWindow::ActivateOtherWindowHelper(HWND aWnd) // Play the minimize sound while we're here, since that is also // forgotten when we use SW_SHOWMINIMIZED. - ::PlaySoundW(L"Minimize", nsnull, SND_ALIAS | SND_NODEFAULT | SND_ASYNC); + nsCOMPtr sound(do_CreateInstance("@mozilla.org/sound;1")); + if (sound) { + sound->PlaySystemSound(NS_LITERAL_STRING("Minimize")); + } } void nsWindow::OnWindowPosChanging(LPWINDOWPOS& info)