harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r577655 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinEvent.java
Date Thu, 20 Sep 2007 09:42:33 GMT
Author: apetrenko
Date: Thu Sep 20 02:42:33 2007
New Revision: 577655

URL: http://svn.apache.org/viewvc?rev=577655&view=rev
Log:
Patch for HARMONY-4761 "[classlib][awt] InputEvent.getModifiers() doesn't return modifiers
for mouse release event"

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinEvent.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinEvent.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinEvent.java?rev=577655&r1=577654&r2=577655&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinEvent.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinEvent.java
Thu Sep 20 02:42:33 2007
@@ -584,9 +584,9 @@
         modifiers |= ((win32.GetKeyState(VK_MENU) & 0x80) != 0) ?
                 InputEvent.ALT_DOWN_MASK : 0;
 
-        modifiers |= (wParam & MK_LBUTTON) != 0 ? InputEvent.BUTTON1_DOWN_MASK : 0;
-        modifiers |= (wParam & MK_MBUTTON) != 0 ? InputEvent.BUTTON2_DOWN_MASK : 0;
-        modifiers |= (wParam & MK_RBUTTON) != 0 ? InputEvent.BUTTON3_DOWN_MASK : 0;
+        modifiers |= ((wParam & MK_LBUTTON) != 0) || (msg == WM_LBUTTONUP) ? InputEvent.BUTTON1_DOWN_MASK
: 0;
+        modifiers |= ((wParam & MK_MBUTTON) != 0) || (msg == WM_MBUTTONUP) ? InputEvent.BUTTON2_DOWN_MASK
: 0;
+        modifiers |= ((wParam & MK_RBUTTON) != 0) || (msg == WM_RBUTTONUP) ? InputEvent.BUTTON3_DOWN_MASK
: 0;
         return modifiers;
     }
 }



Mime
View raw message