Author: jimtabor Date: Tue Oct 11 03:48:47 2011 New Revision: 54077 URL: http://svn.reactos.org/svn/reactos?rev=54077&view=rev Log: - Fix applications that depend on KF_DLGMODE flag. - Added the Alt-Tab intercept for win32k.
Modified: trunk/reactos/subsystems/win32/win32k/include/input.h trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c Modified: trunk/reactos/subsystems/win32/win32k/include/input.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/include/input.h?rev=54077&r1=54076&r2=54077&view=diff ============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/input.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/input.h [iso-8859-1] Tue Oct 11 03:48:47 2011 @@ -33,11 +33,13 @@ /* Scan Codes */ #define SC_KEY_UP 0x8000 /* lParam bits */ -#define LP_EXT_BIT (1<<24) +#define LP_EXT_BIT (KF_EXTENDED<<16) #define LP_DO_NOT_CARE_BIT (1<<25) // for GetKeyNameText -#define LP_CONTEXT_BIT (1<<29) -#define LP_PREV_STATE_BIT (1<<30) -#define LP_TRANSITION_BIT (1<<31) +#define LP_DLGMODE (KF_DLGMODE<<16) +#define LP_MENUMODE (KF_MENUMODE<<16) +#define LP_CONTEXT_BIT (KF_ALTDOWN<<16) +#define LP_PREV_STATE_BIT (KF_REPEAT<<16) +#define LP_TRANSITION_BIT (KF_UP<<16) INIT_FUNCTION NTSTATUS NTAPI InitInputImpl(VOID); Modified: trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c?rev=54077&r1=54076&r2=54077&view=diff ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c [iso-8859-1] Tue Oct 11 03:48:47 2011 @@ -790,6 +790,12 @@ Msg.lParam |= LP_TRANSITION_BIT; } + /* FIXME: set KF_DLGMODE and KF_MENUMODE when needed */ + if ( pFocusQueue && pFocusQueue->QF_flags & QF_DIALOGACTIVE ) + Msg.lParam |= LP_DLGMODE; + if ( pFocusQueue && pFocusQueue->MenuOwner )//pFocusQueue->MenuState ) // MenuState needs a start flag... + Msg.lParam |= LP_MENUMODE; + /* Init wParam and cursor position */ Msg.wParam = wVk; // Note: it's simplified by msg queue Msg.pt = gpsi->ptCursor; @@ -832,6 +838,14 @@ /* Support VK_*MENU keys */ if (!bIsDown && wSimpleVk == VK_MENU && !IS_KEY_DOWN(gafAsyncKeyState, VK_CONTROL)) co_IntKeyboardSendAltKeyMsg(); + } + + /* Alt-Tab/Esc Check. Use FocusQueue or RIT Queue */ + if (!(pKbdInput->dwFlags & KEYEVENTF_KEYUP) && + HIWORD(Msg.lParam) & KF_ALTDOWN && + ( Msg.wParam == VK_ESCAPE || Msg.wParam == VK_TAB ) ) + { + TRACE("Alt-Tab/Esc Pressed wParam %x\n",Msg.wParam); } /* If we have a focus queue, post a keyboard message */