diff options
-rw-r--r-- | plugins/Scriver/src/statusicon.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/statusicon.cpp | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Scriver/src/statusicon.cpp b/plugins/Scriver/src/statusicon.cpp index b6879370f3..c10c0b0611 100644 --- a/plugins/Scriver/src/statusicon.cpp +++ b/plugins/Scriver/src/statusicon.cpp @@ -44,7 +44,7 @@ void DrawStatusIcons(HANDLE hContact, HDC hDC, RECT r, int gap) void CheckStatusIconClick(HANDLE hContact, HWND hwndFrom, POINT pt, RECT r, int gap, int click_flags)
{
- unsigned int iconNum = (pt.x - r.left) / (GetSystemMetrics(SM_CXSMICON) + gap) + 1;
+ unsigned int iconNum = (pt.x - r.left) / (GetSystemMetrics(SM_CXSMICON) + gap);
StatusIconData *si = Srmm_GetNthIcon(hContact, iconNum);
if (si == NULL)
return;
diff --git a/src/core/stdmsg/src/statusicon.cpp b/src/core/stdmsg/src/statusicon.cpp index 25e7813615..294493e6e5 100644 --- a/src/core/stdmsg/src/statusicon.cpp +++ b/src/core/stdmsg/src/statusicon.cpp @@ -32,7 +32,7 @@ static int OnSrmmIconChanged(WPARAM wParam, LPARAM) else {
HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, hContact);
if (hwnd != NULL)
- PostMessage(GetParent(hwnd), DM_STATUSICONCHANGE, 0, 0);
+ PostMessage(hwnd, DM_STATUSICONCHANGE, 0, 0);
}
return 0;
}
@@ -76,6 +76,8 @@ HANDLE hServiceIcon[3]; int InitStatusIcons()
{
+ HookEvent(ME_MSG_ICONSCHANGED, OnSrmmIconChanged);
+
hHookIconPressedEvt = CreateHookableEvent(ME_MSG_ICONPRESSED);
return 0;
}
|