]> repos.lx-s.de Git - winmute.git/commitdiff
Fixed mute on logoff and shutdown.
authorAlexander Steinhöfer <kontakt@lx-s.de>
Mon, 29 Jun 2020 11:20:56 +0000 (13:20 +0200)
committerAlexander Steinhöfer <kontakt@lx-s.de>
Mon, 29 Jun 2020 11:20:56 +0000 (13:20 +0200)
WinMute/WinMain.cpp
WinMute/WinMute.cpp

index 0a9826d0c16d4dc873dfa4f2e0d6c419ac4c58de..6bffcc28ca3cd1eff97615590901d473c7747b55 100644 (file)
@@ -50,7 +50,7 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance,
                     nullptr,
                     PROGRAM_NAME,
                     _T("WinMute is already running"),
-                    _T("Please look for a blue speaker icon in your Windows ")
+                    _T("Please look for a white speaker icon in your Windows ")
                     _T(" taskbar notification area."),
                     TDCBF_OK_BUTTON,
                     TD_ERROR_ICON,
index 2536f36c97794699625f73aa80aea638e747452c..9d4b4a08b0f398dea0263ca15528a2f2bd576284 100644 (file)
@@ -100,7 +100,7 @@ bool WinMute::RegisterWindowClass()
 bool WinMute::InitWindow()
 {
    hWnd_ = CreateWindowEx(WS_EX_TOOLWINDOW, WINMUTE_CLASS_NAME, PROGRAM_NAME,
-      WS_POPUP, 0, 0, 0, 0, HWND_MESSAGE, 0, hglobInstance, this);
+      WS_POPUP, 0, 0, 0, 0, NULL, 0, hglobInstance, this);
    if (hWnd_ == nullptr) {
       PrintWindowsError(_T("CreateWindowEx"));
       return false;
@@ -346,7 +346,7 @@ LRESULT CALLBACK WinMute::WindowProc(HWND hWnd, UINT msg,
          if (muteConfig_.noRestore.onShutdown) {
             audio_->Mute();
          }
-      } else if (lParam == ENDSESSION_LOGOFF) {
+      } else if ((lParam & ENDSESSION_LOGOFF)) {
          if (muteConfig_.noRestore.onLogoff) {
             audio_->Mute();
          }