From c9b740a178828eae5cc4be7ab054e5f26d3a27e7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 21 Sep 2023 14:34:07 +0300 Subject: MessageWindowEventData: useless structure removed --- plugins/MagneticWindows/src/MagneticWindows.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'plugins/MagneticWindows/src') diff --git a/plugins/MagneticWindows/src/MagneticWindows.cpp b/plugins/MagneticWindows/src/MagneticWindows.cpp index 9256fee2b7..0c35fa1451 100644 --- a/plugins/MagneticWindows/src/MagneticWindows.cpp +++ b/plugins/MagneticWindows/src/MagneticWindows.cpp @@ -39,7 +39,6 @@ CMPlugin::CMPlugin() : // Plugin Functions /////////////////////////////////////////////////////////////////////////////////////////////////// - //For other Plugins to start snapping for other Windows INT_PTR SnapPluginWindowStart(WPARAM wParam, LPARAM) { @@ -54,14 +53,14 @@ INT_PTR SnapPluginWindowStop(WPARAM wParam, LPARAM) return 0; } -int PluginMessageWindowEvent(WPARAM, LPARAM lParam) +int PluginMessageWindowEvent(WPARAM uType, LPARAM lParam) { - MessageWindowEventData *Data = (MessageWindowEventData*)lParam; + auto *pDlg = (CSrmmBaseDialog *)lParam; - switch (Data->uType) { + switch (uType) { case MSG_WINDOW_EVT_OPEN: { - HWND hWnd = Data->hwndWindow; + HWND hWnd = pDlg->GetHwnd(); HWND hWndParent = GetParent(hWnd); while ((hWndParent != 0) && (hWndParent != GetDesktopWindow()) && (IsWindowVisible(hWndParent))) { hWnd = hWndParent; @@ -73,7 +72,7 @@ int PluginMessageWindowEvent(WPARAM, LPARAM lParam) break; case MSG_WINDOW_EVT_CLOSING: - WindowClose(Data->hwndWindow); + WindowClose(pDlg->GetHwnd()); break; } -- cgit v1.2.3