summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-11-05 20:21:19 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-11-05 20:21:19 +0300
commite7817210488dafcf8c674c2ce92c71ba41675a80 (patch)
tree64c49bcf583e93900a953009b034ca5d33b25017 /plugins
parent465fc277e309b2ef7db2d7b6028ad35c41dd1c36 (diff)
fixes #3807 (Popup+: настройка YAMN "всегда показывать вспл.окна" имеет приоритет перед глушением окон в idle)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Popup/src/main.cpp3
-rw-r--r--plugins/Popup/src/services.cpp5
-rw-r--r--plugins/Popup/src/stdafx.h2
3 files changed, 6 insertions, 4 deletions
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index 04ee826c2e..e1ba577864 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -237,6 +237,9 @@ static int ModulesLoaded(WPARAM, LPARAM)
LoadActions();
LoadNotifications();
+ // register idle mode switcher
+ HookEvent(ME_IDLE_CHANGED, OnIdleChanged);
+
// hook TopToolBar
HookEvent(ME_TTB_MODULELOADED, TTBLoaded);
diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp
index 48a73fc864..32a9f4d4c7 100644
--- a/plugins/Popup/src/services.cpp
+++ b/plugins/Popup/src/services.cpp
@@ -475,7 +475,7 @@ static INT_PTR Popup_LoadSkin(WPARAM, LPARAM lParam)
return 1;
}
-static int OnIdleChanged(WPARAM, LPARAM lParam)
+int OnIdleChanged(WPARAM, LPARAM lParam)
{
g_bIdleMode = (lParam & IDF_ISIDLE) != 0;
return 0;
@@ -514,7 +514,4 @@ void CreateServices()
CreateServiceFunction(MS_POPUP_DESTROYPOPUP, Popup_DeletePopup);
CreateServiceFunction("Popup/LoadSkin", Popup_LoadSkin);
-
- // register idle mode switcher
- HookEvent(ME_IDLE_CHANGED, OnIdleChanged);
}
diff --git a/plugins/Popup/src/stdafx.h b/plugins/Popup/src/stdafx.h
index 8d297fd0e0..6cfca9e544 100644
--- a/plugins/Popup/src/stdafx.h
+++ b/plugins/Popup/src/stdafx.h
@@ -139,4 +139,6 @@ INT_PTR svcEnableDisableMenuCommand(WPARAM, LPARAM);
void InitIcons();
void CreateServices();
+int OnIdleChanged(WPARAM, LPARAM lParam);
+
#endif //HEADERS_H