Fix NPPN_DARKMODECHANGED wrong return value to plugins

Send NPPN_DARKMODECHANGED notification with hwndNpp as hwndFrom, so the documented API info on https://npp-user-manual.org/docs/plugin-communication/#nppn-darkmodechanged is correct. Previously it sends 0 which is of no use to plugin authors.

Fix #12144, close #12160
This commit is contained in:
blu3mania 2022-09-12 19:20:43 -04:00 committed by Don Ho
parent d03b11ebf8
commit 84b8c64944
1 changed files with 1 additions and 1 deletions

View File

@ -205,7 +205,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
// Notify plugins that Dark Mode changed
SCNotification scnN;
scnN.nmhdr.code = NPPN_DARKMODECHANGED;
scnN.nmhdr.hwndFrom = reinterpret_cast<void*>(lParam);
scnN.nmhdr.hwndFrom = hwnd;
scnN.nmhdr.idFrom = 0;
_pluginsManager.notify(&scnN);
return TRUE;