Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 336624

Summary: Cannot get simultaneous left and right mouse button in SWT.MouseMoveevents on Mac
Product: [Eclipse Project] Platform Reporter: riesem
Component: SWTAssignee: Scott Kovatch <skovatch>
Status: RESOLVED FIXED QA Contact: Silenio Quarti <Silenio_Quarti>
Severity: normal    
Priority: P3 CC: darnells, skovatch
Version: 3.6.1   
Target Milestone: 3.7 M6   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Example code none

Description riesem CLA 2011-02-08 10:15:44 EST
Build Identifier: 3.6.1.v3659

If I attach a Listener for SWT.MouseMove events to a SWT Canvas, on Windows I can success fully query the event state mask for simultaneous left and right mouse buttons. On Mac the state mask never contains both the flag for button1 and button3. If they are clicked the same time button1 is the only one in the statemask.

Reproducible: Always

Steps to Reproduce:
1. Execute the attached file
2. press left, right, and both mouse buttons while moving
3. On Windows it will print "Hit!" for the last case. Not so for Mac
Comment 1 riesem CLA 2011-02-08 10:16:56 EST
Created attachment 188522 [details]
Example code
Comment 2 Scott Kovatch CLA 2011-02-08 12:32:15 EST
For some reason we were only getting the button state for certain kinds of native events. GetCurrentEventButtonState should always be used to get the button mask.

Fixed > 20110208.
Comment 3 Scott Kovatch CLA 2011-02-08 12:33:24 EST
I assumed you meant Cocoa, not Carbon. We won't be fixing this on Carbon, if it's a problem there.
Comment 4 riesem CLA 2011-02-08 12:39:31 EST
Yes, Cocoa is what I was looking at.