diff options
-rw-r--r-- | src/mir_core/subclass.cpp | 4 | ||||
-rw-r--r-- | src/modules/clist/clisttray.cpp | 6 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/mir_core/subclass.cpp b/src/mir_core/subclass.cpp index fe63f715eb..c6fddcb5e8 100644 --- a/src/mir_core/subclass.cpp +++ b/src/mir_core/subclass.cpp @@ -109,10 +109,6 @@ static void removeHook(MSubclassData *p, int idx) for (int i=idx+1; i < p->m_iHooks; i++)
p->m_hooks[i-1] = p->m_hooks[i];
p->m_iHooks--;
-
- // emulate window destruction
- saveProc(p->m_hWnd, WM_DESTROY, 0, 0);
- saveProc(p->m_hWnd, WM_NCDESTROY, 0, 0);
}
MIR_CORE_DLL(void) mir_unsubclassWindow(HWND hWnd, WNDPROC wndProc)
diff --git a/src/modules/clist/clisttray.cpp b/src/modules/clist/clisttray.cpp index 4bd8d68c34..97a0d9d08d 100644 --- a/src/modules/clist/clisttray.cpp +++ b/src/modules/clist/clisttray.cpp @@ -738,13 +738,11 @@ INT_PTR fnTrayIconProcessMessage(WPARAM wParam, LPARAM lParam) cli.pfnShowHide(0, 0);
}
else if (msg->lParam == WM_RBUTTONUP) {
- MENUITEMINFO mi;
- POINT pt;
HMENU hMainMenu = LoadMenu(cli.hInst, MAKEINTRESOURCE(IDR_CONTEXT));
HMENU hMenu = GetSubMenu(hMainMenu, 0);
TranslateMenu(hMenu);
- ZeroMemory(&mi, sizeof(mi));
+ MENUITEMINFO mi = { 0 };
mi.cbSize = MENUITEMINFO_V4_SIZE;
mi.fMask = MIIM_SUBMENU | MIIM_TYPE;
mi.fType = MFT_STRING;
@@ -758,6 +756,8 @@ INT_PTR fnTrayIconProcessMessage(WPARAM wParam, LPARAM lParam) SetForegroundWindow(msg->hwnd);
SetFocus(msg->hwnd);
+
+ POINT pt;
GetCursorPos(&pt);
TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN, pt.x, pt.y, 0, msg->hwnd, NULL);
|