From 698d2c931a1520a17ec6acda89a7126ea1119f3c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 23 Dec 2016 18:07:47 +0300 Subject: unneeded message removed --- src/core/stdmsg/src/msgdialog.cpp | 13 ------------- src/core/stdmsg/src/msgs.cpp | 11 +++++++++-- src/core/stdmsg/src/msgs.h | 1 - 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 04c0888ae5..cdece6d597 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -1045,19 +1045,6 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) SendMessage(m_hwnd, WM_SIZE, 0, 0); break; - case DM_GETWINDOWSTATE: - { - UINT state = MSG_WINDOW_STATE_EXISTS; - if (IsWindowVisible(m_hwnd)) - state |= MSG_WINDOW_STATE_VISIBLE; - if (GetForegroundWindow() == m_hwnd) - state |= MSG_WINDOW_STATE_FOCUS; - if (IsIconic(m_hwnd)) - state |= MSG_WINDOW_STATE_ICONIC; - SetWindowLongPtr(m_hwnd, DWLP_MSGRESULT, state); - } - return TRUE; - case DM_CASCADENEWWINDOW: if ((HWND)wParam != m_hwnd) { RECT rcThis, rcNew; diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index 0fd2444ca0..4219ed2c34 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -454,8 +454,9 @@ static int IconsChanged(WPARAM, LPARAM) { FreeMsgLogIcons(); LoadMsgLogIcons(); - WindowList_Broadcast(pci->hWindowList, DM_REMAKELOG, 0, 0); + // change all the icons + WindowList_Broadcast(pci->hWindowList, DM_REMAKELOG, 0, 0); WindowList_Broadcast(pci->hWindowList, DM_UPDATEWINICON, 0, 0); return 0; } @@ -522,7 +523,13 @@ static INT_PTR GetWindowData(WPARAM wParam, LPARAM lParam) mwd->uFlags = MSG_WINDOW_UFLAG_MSG_BOTH; mwd->hwndWindow = hwnd; mwd->local = 0; - mwd->uState = SendMessage(hwnd, DM_GETWINDOWSTATE, 0, 0); + mwd->uState = MSG_WINDOW_STATE_EXISTS; + if (IsWindowVisible(hwnd)) + mwd->uState |= MSG_WINDOW_STATE_VISIBLE; + if (GetForegroundWindow() == hwnd) + mwd->uState |= MSG_WINDOW_STATE_FOCUS; + if (IsIconic(hwnd)) + mwd->uState |= MSG_WINDOW_STATE_ICONIC; return 0; } diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h index 505c88f80f..dd5c87291b 100644 --- a/src/core/stdmsg/src/msgs.h +++ b/src/core/stdmsg/src/msgs.h @@ -43,7 +43,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define DM_GETAVATAR (WM_USER+26) #define DM_UPDATESIZEBAR (WM_USER+27) #define HM_AVATARACK (WM_USER+28) -#define DM_GETWINDOWSTATE (WM_USER+30) #define DM_STATUSICONCHANGE (WM_USER+31) #define EVENTTYPE_JABBER_CHATSTATES 2000 -- cgit v1.2.3