From d2ae65c7107da74415218aebdc2acdcbde506915 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Thu, 11 Aug 2016 00:29:26 +0000 Subject: [PATCH] - Fix Desktop hang if no windows open. svn path=/trunk/; revision=72194 --- reactos/win32ss/user/user32/controls/appswitch.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/reactos/win32ss/user/user32/controls/appswitch.c b/reactos/win32ss/user/user32/controls/appswitch.c index d9940c19e69..229ee8495f9 100644 --- a/reactos/win32ss/user/user32/controls/appswitch.c +++ b/reactos/win32ss/user/user32/controls/appswitch.c @@ -312,7 +312,7 @@ void PrepareWindow(VOID) ResizeAndCenter(switchdialog, totalW, totalH); } -void ProcessHotKey(VOID) +BOOL ProcessHotKey(VOID) { if (!isOpen) { @@ -320,7 +320,7 @@ void ProcessHotKey(VOID) EnumWindowsZOrder(EnumerateCallback, 0); if (windowCount < 2) - return; + return FALSE; selectedWindow = 1; @@ -335,6 +335,7 @@ void ProcessHotKey(VOID) selectedWindow = (selectedWindow + 1)%windowCount; InvalidateRect(switchdialog, NULL, TRUE); } + return TRUE; } LRESULT WINAPI DoAppSwitch( WPARAM wParam, LPARAM lParam ) @@ -359,7 +360,7 @@ LRESULT WINAPI DoAppSwitch( WPARAM wParam, LPARAM lParam ) case VK_TAB: if( !CreateSwitcherWindow(User32Instance) ) goto Exit; if( !GetDialogFont() ) goto Exit; - ProcessHotKey(); + if( !ProcessHotKey() ) goto Exit; break; case VK_ESCAPE: