From f8c24169ee95e5a0a7290e5a1935855c099ce847 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 30 Dec 2014 14:53:06 +0000 Subject: another crutch git-svn-id: http://svn.miranda-ng.org/main/trunk@11682 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/mim.cpp | 3 +++ plugins/TabSRMM/src/mim.h | 50 ++++++++++++++---------------------------- plugins/TabSRMM/src/msglog.cpp | 4 ++-- 3 files changed, 21 insertions(+), 36 deletions(-) diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index 9834df89ae..be236744f4 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -186,6 +186,9 @@ bool CMimAPI::getAeroState() void CMimAPI::InitAPI() { + DWORD dwVer = LOWORD(GetVersion()); + m_winVer = MAKEWORD(HIBYTE(dwVer), LOBYTE(dwVer)); + m_hUxTheme = 0; // vista+ DWM API diff --git a/plugins/TabSRMM/src/mim.h b/plugins/TabSRMM/src/mim.h index de661242da..4900e1d95b 100644 --- a/plugins/TabSRMM/src/mim.h +++ b/plugins/TabSRMM/src/mim.h @@ -145,40 +145,22 @@ public: __forceinline double getFreq() const { return m_dFreq; } __forceinline double getMsec() const { return 1000 * ((double)(m_tStop - m_tStart) * m_dFreq); } - /* - * os dependant stuff (aero, visual styles etc.) - */ + ////////////////////////////////////////////////////////////////////////////////////// + // os dependent stuff (aero, visual styles etc.) - /** - * return status of Vista Aero - * - * @return bool: true if aero active, false otherwise - */ - const bool isAero() const { return(m_isAero); } - const bool isDwmActive() const { return(m_DwmActive); } - - /** - * Refresh Aero status. - * Called on: - * * plugin init - * * WM_DWMCOMPOSITIONCHANGED message received - * - * @return - */ + // returns status of Windows Aero + const bool isAero() const { return m_isAero; } + + const bool isDwmActive() const { return m_DwmActive; } + const DWORD getWinVer() const { return m_winVer; } + + // refresh Aero status. bool getAeroState(); - /** - * return status of visual styles theming engine (Windows XP+) - * - * @return bool: themes are enabled - */ - bool isVSThemed() - { - return m_isVsThemed; - } - /* - * window lists - */ + // returns status of visual styles theming engine (Windows XP+) + __forceinline bool isVSThemed() { return m_isVsThemed; } + + // window lists void BroadcastMessage(UINT msg, WPARAM wParam, LPARAM lParam); void BroadcastMessageAsync(UINT msg, WPARAM wParam, LPARAM lParam); INT_PTR AddWindow(HWND hWnd, MCONTACT h); @@ -194,9 +176,8 @@ public: public: HANDLE m_hMessageWindowList; - /* - various function pointers - */ + + // various function pointers static PDTTE m_pfnDrawThemeTextEx; static DEFICA m_pfnDwmExtendFrameIntoClientArea; static DICE m_pfnDwmIsCompositionEnabled; @@ -225,6 +206,7 @@ private: double m_dFreq; char m_timerMsg[256]; bool m_hasFolders; + DWORD m_winVer; HANDLE m_hChatLogLock; void InitAPI(); diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index 2a451bafd3..08a4aa57df 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -1353,8 +1353,8 @@ void TSAPI StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAp ReplaceIcons(hwndDlg, dat, startAt, fAppend, isSent); dat->clr_added = FALSE; - bool bForce = (dat->hwndIEView == 0 && dat->hwndHPP == 0); - DM_ScrollToBottom(dat, bForce, bForce); + if (dat->hwndIEView == 0 && dat->hwndHPP == 0 && (!M.isAero() || M.getWinVer() != 0x0601)) + DM_ScrollToBottom(dat, 1, 1); HWND hwndLog = GetDlgItem(hwndDlg, IDC_LOG); SendMessage(hwndLog, WM_SETREDRAW, TRUE, 0); -- cgit v1.2.3