summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-06-13 15:09:41 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-06-13 15:09:41 +0300
commit346ae348ae7ee5a594c9fcd17114ae949c1ce201 (patch)
tree1e42c52d59515646d603a9593ce23d094a5fde20 /src
parent7524e8b875b924bb3cee484e90f6cc6bc01515a4 (diff)
Popup+: fix for a madness with default popup class values
Diffstat (limited to 'src')
-rw-r--r--src/core/stdpopup/src/options.cpp2
-rw-r--r--src/core/stdpopup/src/services.cpp1
-rw-r--r--src/mir_app/src/popups.cpp6
3 files changed, 4 insertions, 5 deletions
diff --git a/src/core/stdpopup/src/options.cpp b/src/core/stdpopup/src/options.cpp
index cff89de23e..6e196dfea7 100644
--- a/src/core/stdpopup/src/options.cpp
+++ b/src/core/stdpopup/src/options.cpp
@@ -465,7 +465,7 @@ public:
POPUPCLASS pc = *p;
pc.PluginWindowProc = nullptr;
- POPUPDATACLASS d = { sizeof(d) };
+ POPUPDATACLASS d = {};
d.pszClassName = pc.pszName;
if (p->flags & PCF_UNICODE) {
d.szTitle.w = TranslateT("Preview");
diff --git a/src/core/stdpopup/src/services.cpp b/src/core/stdpopup/src/services.cpp
index b743e173df..aa5defdb00 100644
--- a/src/core/stdpopup/src/services.cpp
+++ b/src/core/stdpopup/src/services.cpp
@@ -337,7 +337,6 @@ static INT_PTR UnregisterPopupClass(WPARAM, LPARAM lParam)
static INT_PTR CreateClassPopup(WPARAM wParam, LPARAM lParam)
{
POPUPDATACLASS *pdc = (POPUPDATACLASS *)lParam;
- if (pdc->cbSize < sizeof(POPUPDATACLASS)) return 1;
POPUPCLASS *pc = nullptr;
if (wParam)
diff --git a/src/mir_app/src/popups.cpp b/src/mir_app/src/popups.cpp
index ac8e7f5dd9..bc4d5f86d8 100644
--- a/src/mir_app/src/popups.cpp
+++ b/src/mir_app/src/popups.cpp
@@ -114,7 +114,7 @@ MIR_APP_DLL(int) PURegisterActions(POPUPACTION *actions, int count)
return (int)CallService(MS_POPUP_REGISTERACTIONS, (WPARAM)actions, (LPARAM)count);
}
-MIR_APP_DLL(HANDLE) PURegisterNotification(LPPOPUPNOTIFICATION notification)
+MIR_APP_DLL(HANDLE) PURegisterNotification(POPUPNOTIFICATION *notification)
{
return (HANDLE)CallService(MS_POPUP_REGISTERNOTIFICATION, (WPARAM)notification, 0);
}
@@ -140,7 +140,7 @@ MIR_APP_DLL(HWND) Popup_AddClass(POPUPDATACLASS *pData)
MIR_APP_DLL(HWND) ShowClassPopup(const char *name, const char *title, const char *text)
{
- POPUPDATACLASS d = { sizeof(d) };
+ POPUPDATACLASS d = {};
d.pszClassName = name;
d.szTitle.a = title;
d.szText.a = text;
@@ -149,7 +149,7 @@ MIR_APP_DLL(HWND) ShowClassPopup(const char *name, const char *title, const char
MIR_APP_DLL(HWND) ShowClassPopupW(const char *name, const wchar_t *title, const wchar_t *text)
{
- POPUPDATACLASS d = { sizeof(d) };
+ POPUPDATACLASS d = {};
d.pszClassName = name;
d.szTitle.w = title;
d.szText.w = text;