[KBSWITCH] Improve mouse events handling. By Joachim Henze. CORE-9883
authorAmine Khaldi <amine.khaldi@reactos.org>
Sat, 27 Jun 2015 17:15:38 +0000 (17:15 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sat, 27 Jun 2015 17:15:38 +0000 (17:15 +0000)
svn path=/trunk/; revision=68294

reactos/base/applications/kbswitch/kbswitch.c

index 6d58da0..09534f6 100644 (file)
@@ -434,18 +434,17 @@ WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
         case WM_NOTIFYICONMSG:
             switch (lParam)
             {
-                case WM_RBUTTONDOWN:
-                case WM_LBUTTONDOWN:
+                case WM_RBUTTONUP:
+                case WM_LBUTTONUP:
                 {
                     POINT pt;
 
                     GetCursorPos(&pt);
                     SetForegroundWindow(hwnd);
 
-                    if (lParam == WM_LBUTTONDOWN)
+                    if (lParam == WM_LBUTTONUP)
                     {
                         HMENU hLeftPopupMenu;
-
                         /* Rebuild the left popup menu on every click to take care of keyboard layout changes */
                         hLeftPopupMenu = BuildLeftPopupMenu();
                         TrackPopupMenu(hLeftPopupMenu, 0, pt.x, pt.y, 0, hwnd, NULL);