From be83e8f193b3c7bbd0123a8ce54742354ba14f43 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 15 Feb 2000 19:48:19 +0000 Subject: [PATCH] Fixed precedence order problem for IsShiftDown and IsCtrlDown. (It was using the toggle bit instead of the is-down-now bit because of the order of evaluation of the operators.) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index bba5e56705..edc10844ea 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -130,8 +130,8 @@ wxWindow *wxFindWinFromHandle(WXHWND hWnd); static void TranslateKbdEventToMouse(wxWindow *win, int *x, int *y, WPARAM *flags); // get the current state of SHIFT/CTRL keys -static inline bool IsShiftDown() { return GetKeyState(VK_SHIFT)& 0x100 != 0; } -static inline bool IsCtrlDown() { return GetKeyState(VK_CONTROL)& 0x100 != 0; } +static inline bool IsShiftDown() { return (GetKeyState(VK_SHIFT) & 0x100) != 0; } +static inline bool IsCtrlDown() { return (GetKeyState(VK_CONTROL) & 0x100) != 0; } // --------------------------------------------------------------------------- // event tables -- 2.47.2