We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4462

Summary: Android: test with STYLUS Input Device in SeparateMouseAndTouch mode
Product: SDL Reporter: Sylvain <sylvain.becker>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 Keywords: target-2.0.10
Version: don't know   
Hardware: All   
OS: Android (All)   

Description Sylvain 2019-01-17 11:49:13 UTC
In Separate-Mouse-And-Touch mode,
what should happen for a Stylus or Bluetooth Stylus ? Currently, it would still use onNativeTouch().


https://hg.libsdl.org/SDL/annotate/09698ac34c0e/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java#l1762

For "Mouse" and "Mouse|TouchScreen"
  it take the path "onNativeMouse()"
Otherwise, 
  it goes with "onNativeTouch()"

Maybe:

  if ((event.getSource() == InputDevice.SOURCE_MOUSE || event.getSource() == (InputDevice.SOURCE_MOUSE | InputDevice.SOURCE_TOUCHSCREEN)) && SDLActivity.mSeparateMouseAndTouch) {

Could be re-write as:
  
  if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) && SDLActivity.mSeparateMouseAndTouch) {



SOURCE_MOUSE       Constant Value: 8194 (0x00002002) 
SOURCE_TOUCHSCREEN Constant Value: 4098 (0x00001002) 
SOURCE_STYLUS      Constant Value: 16386 (0x00004002) 
SOURCE_BLUETOOTH_STYLUS Constant Value: 49154 (0x0000c002)

They all belong to SOURCE_CLASS_POINTER (0x2) .
Comment 1 Ryan C. Gordon 2019-05-18 18:48:55 UTC
Tagging a bunch of bugs with "target-2.0.10" so we have a clear list of things to address before a 2.0.10 release.

Please note that "addressing" one of these bugs might mean deciding to defer on it until after 2.0.10, or resolving it as WONTFIX, etc. This is just here to tell us we should look at it carefully, and soon.

If you have new information or feedback on this issue, this is a good time to add it to the conversation, as we're likely to be paying attention to this specific report in the next few days/weeks.

Thanks!

--ryan.
Comment 2 Sam Lantinga 2019-05-19 18:59:11 UTC
I think it makes sense for stylus to be treated like touch input. So we just leave it as-is, right?
Comment 3 Sylvain 2019-05-20 19:41:49 UTC
yes, I close it as invalid