diff options
author | George Hazan <george.hazan@gmail.com> | 2016-04-19 14:54:06 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-04-19 14:54:06 +0000 |
commit | cfd5e84d59e615d93f721f7c016f5606487657ac (patch) | |
tree | 68ee1fde81476e8cdd6fc285cea61277e6d54673 /src | |
parent | 01ff549a2303122360f819c3344ff8a374839d82 (diff) |
faster, even faster
git-svn-id: http://svn.miranda-ng.org/main/trunk@16718 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/clc.cpp | 21 | ||||
-rw-r--r-- | src/mir_app/src/clui.cpp | 4 |
2 files changed, 14 insertions, 11 deletions
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp index 556e2ca308..6169fef209 100644 --- a/src/mir_app/src/clc.cpp +++ b/src/mir_app/src/clc.cpp @@ -44,7 +44,7 @@ void fnInitAutoRebuild(HWND hWnd) {
if (!cli.bAutoRebuild && hWnd) {
cli.bAutoRebuild = true;
- SendMessage(hWnd, CLM_AUTOREBUILD, 0, 0);
+ PostMessage(hWnd, CLM_AUTOREBUILD, 0, 0);
}
}
@@ -790,29 +790,35 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam case TIMERID_RENAME:
cli.pfnBeginRenameSelection(hwnd, dat);
break;
+
case TIMERID_DRAGAUTOSCROLL:
cli.pfnScrollTo(hwnd, dat, dat->yScroll + dat->dragAutoScrolling * dat->rowHeight * 2, 0);
break;
+
case TIMERID_INFOTIP:
+ KillTimer(hwnd, wParam);
{
CLCINFOTIP it;
- RECT clRect;
- POINT ptClientOffset = { 0 };
-
- KillTimer(hwnd, wParam);
GetCursorPos(&it.ptCursor);
ScreenToClient(hwnd, &it.ptCursor);
if (it.ptCursor.x != dat->ptInfoTip.x || it.ptCursor.y != dat->ptInfoTip.y)
break;
+
+ RECT clRect;
GetClientRect(hwnd, &clRect);
+
it.rcItem.left = 0;
it.rcItem.right = clRect.right;
+
hit = cli.pfnHitTest(hwnd, dat, it.ptCursor.x, it.ptCursor.y, &contact, NULL, NULL);
if (hit == -1)
break;
if (contact->type != CLCIT_GROUP && contact->type != CLCIT_CONTACT)
break;
+
ClientToScreen(hwnd, &it.ptCursor);
+
+ POINT ptClientOffset = { 0 };
ClientToScreen(hwnd, &ptClientOffset);
it.isTreeFocused = GetFocus() == hwnd;
it.rcItem.top = cli.pfnGetRowTopY(dat, hit) - dat->yScroll;
@@ -822,9 +828,10 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam it.hItem = (contact->type == CLCIT_GROUP) ? (HANDLE)contact->groupId : (HANDLE)contact->hContact;
it.cbSize = sizeof(it);
dat->hInfoTipItem = cli.pfnContactToHItem(contact);
- NotifyEventHooks(hShowInfoTipEvent, 0, (LPARAM)& it);
- break;
+ NotifyEventHooks(hShowInfoTipEvent, 0, (LPARAM)&it);
}
+ break;
+
case TIMERID_REBUILDAFTER:
KillTimer(hwnd, TIMERID_REBUILDAFTER);
cli.pfnInvalidateRect(hwnd, NULL, FALSE);
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp index d3f19c7a5c..fe2ae6ad3c 100644 --- a/src/mir_app/src/clui.cpp +++ b/src/mir_app/src/clui.cpp @@ -795,10 +795,6 @@ CLS_HIDEEMPTYGROUPS : 0), 0, 0, 0, 0, hwnd, NULL, cli.hInst, NULL); cli.pfnSetAllExtraIcons((UINT_PTR)nmc->hItem);
return TRUE;
- case CLN_LISTREBUILT:
- cli.pfnSetAllExtraIcons(NULL);
- return(FALSE);
-
case NM_KEYDOWN:
return CallService(MS_CLIST_MENUPROCESSHOTKEY, ((NMKEY*)lParam)->nVKey, MPCF_MAINMENU | MPCF_CONTACTMENU);
|