]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed precedence order problem for IsShiftDown and IsCtrlDown. (It
authorRobin Dunn <robin@alldunn.com>
Tue, 15 Feb 2000 19:48:19 +0000 (19:48 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 15 Feb 2000 19:48:19 +0000 (19:48 +0000)
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

index bba5e5670564ec0febe9334ba10b5a7a338f5271..edc10844eab053ab6d65b144762fd378d49de026 100644 (file)
@@ -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