Author: cwittich Date: Thu Feb 26 16:16:36 2015 New Revision: 66472
URL: http://svn.reactos.org/svn/reactos?rev=66472&view=rev Log: [TASKMGR] fix keyboard navigation for the tabcontrol See issue 4245 for more details.
Modified: trunk/reactos/base/applications/taskmgr/taskmgr.c
Modified: trunk/reactos/base/applications/taskmgr/taskmgr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/t... ============================================================================== --- trunk/reactos/base/applications/taskmgr/taskmgr.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/taskmgr/taskmgr.c [iso-8859-1] Thu Feb 26 16:16:36 2015 @@ -47,6 +47,7 @@ int nOldHeight; /* Holds the previous client area height */
BOOL bInMenuLoop = FALSE; /* Tells us if we are in the menu loop */ +BOOL bWasKeyboardInput = FALSE; /* TabChange by Keyboard or Mouse ? */
TASKMANAGER_SETTINGS TaskManagerSettings;
@@ -411,12 +412,21 @@ case WM_NOTIFY: pnmh = (LPNMHDR)lParam; if ((pnmh->hwndFrom == hTabWnd) && - (pnmh->idFrom == IDC_TAB) && - (pnmh->code == TCN_SELCHANGE)) + (pnmh->idFrom == IDC_TAB)) { - TaskManager_OnTabWndSelChange(); - } - break; + switch (pnmh->code) + { + case TCN_SELCHANGE: + TaskManager_OnTabWndSelChange(); + break; + case TCN_KEYDOWN: + bWasKeyboardInput = TRUE; + break; + case NM_CLICK: + bWasKeyboardInput = FALSE; + break; + } + } #if 0 case WM_NCPAINT: hdc = GetDC(hDlg); @@ -1045,7 +1055,8 @@ /* * Give the application list control focus */ - SetFocus(hApplicationPageListCtrl); + if (!bWasKeyboardInput) + SetFocus(hApplicationPageListCtrl); break;
case 1: @@ -1070,7 +1081,8 @@ /* * Give the process list control focus */ - SetFocus(hProcessPageListCtrl); + if (!bWasKeyboardInput) + SetFocus(hProcessPageListCtrl); break;
case 2: @@ -1116,7 +1128,8 @@ /* * Give the tab control focus */ - SetFocus(hTabWnd); + if (!bWasKeyboardInput) + SetFocus(hTabWnd); break; } }