From ead212bffe548ad174a10f8993ea10e9832ed92b Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Wed, 26 Apr 2006 22:44:26 +0000 Subject: [PATCH] - allow start menu selection to loop when using the keyboard - patch by Andreas Bjerkeholt (harteex@gmail.com) svn path=/trunk/; revision=21745 --- reactos/base/shell/explorer/taskbar/startmenu.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/reactos/base/shell/explorer/taskbar/startmenu.cpp b/reactos/base/shell/explorer/taskbar/startmenu.cpp index 15cb5387757..e2a92ccfb1e 100644 --- a/reactos/base/shell/explorer/taskbar/startmenu.cpp +++ b/reactos/base/shell/explorer/taskbar/startmenu.cpp @@ -707,9 +707,15 @@ bool StartMenu::Navigate(int step) for(;;) { idx += step; - if (idx<0 || idx>(int)_buttons.size()) + if ((int)_buttons.size() <= 1 && (idx<0 || idx>(int)_buttons.size())) break; + if (idx<0) + idx += _buttons.size(); + + if (idx>(int)_buttons.size()) + idx -= _buttons.size()+1; + if (SelectButtonIndex(idx, false)) return true; }