Author: tfaber Date: Thu Feb 19 16:30:37 2015 New Revision: 66353
URL: http://svn.reactos.org/svn/reactos?rev=66353&view=rev Log: [EXPLORER] - Fix uninitialized variable use in CTaskSwitchWnd::OnContextMenu
Modified: trunk/reactos/base/shell/explorer/taskswnd.cpp
Modified: trunk/reactos/base/shell/explorer/taskswnd.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/taskswn... ============================================================================== --- trunk/reactos/base/shell/explorer/taskswnd.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/taskswnd.cpp [iso-8859-1] Thu Feb 19 16:30:37 2015 @@ -378,11 +378,11 @@ SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR) &hIcon); if (hIcon) return hIcon; - + hIcon = (HICON) GetClassLongPtr(hwnd, GCL_HICONSM); if (hIcon) return hIcon; - + hIcon = (HICON) GetClassLongPtr(hwnd, GCL_HICON);
return hIcon; @@ -1279,7 +1279,7 @@ }
LRESULT OnThemeChanged(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) - { + { return OnThemeChanged(); }
@@ -1353,7 +1353,7 @@
return Ret; } - + LRESULT HandleShellHookMsg(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { BOOL Ret = FALSE; @@ -1526,7 +1526,7 @@
HMENU hmenu = GetSystemMenu(TaskItem->hWnd, FALSE);
- if (hmenu) + if (hmenu) { POINT pt; int cmd; @@ -1756,11 +1756,12 @@
LRESULT OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { - LRESULT Ret; + LRESULT Ret = 0; + INT_PTR iBtn = -1; + if (m_TaskBar.m_hWnd != NULL) { POINT pt; - INT_PTR iBtn;
pt.x = GET_X_LPARAM(lParam); pt.y = GET_Y_LPARAM(lParam); @@ -1772,13 +1773,10 @@ { HandleButtonRightClick(iBtn); } - else - goto ForwardContextMenuMsg; - } - else - { - ForwardContextMenuMsg: - /* Forward message */ + } + if (iBtn < 0) + { + /* Not on a taskbar button, so forward message to tray */ Ret = SendMessage(m_Tray->GetHWND(), uMsg, wParam, lParam); } return Ret;